# Filter data from StarData based on Distance from Sun?

**URL:** <https://community.wolfram.com/t/filter-data-from-stardata-based-on-distance-from-sun/12034>\
**Category:** Questions\
**Tags:** astronomy, data-science, curated-data\
**Created:** [March 1, 2018, 1:45am UTC](https://community.wolfram.com/t/filter-data-from-stardata-based-on-distance-from-sun/12034 "2018-03-01T01:45:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![artarrok](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@artarrok](https://community.wolfram.com/u/artarrok)\
**Post date:** [March 1, 2018, 1:45am UTC](https://community.wolfram.com/t/filter-data-from-stardata-based-on-distance-from-sun/12034/1 "2018-03-01T01:45:14Z")

</div>

I am trying to get the name of stars that are in a range of distances from the Sun. The Input I have tried is:

```
EntityValue[EntityClass["Star", {"DistanceFromSun"->Between[{Quantity[10,"LightYears"],
Quantity[20, "LightYears"]}]}], {"Name","DistanceFromSun"}]

```

which returns empty set.  
I’ve also used StarData instead of EnityValue, but I get the same result.  
Looking around in the documentation, I found an example in ParticleData that appears similar:

```
EntityValue[EntityClass["Particle",{"Mass"->Between[{
Quantity[900, "Megaelectronvolts"/"SpeedOfLight"^2], 
Quantity[1000, "Megaelectronvolts"/"SpeedOfLight"^2]}]}],{"Name","Mass"}]

```

which returns 9 particles.

Using Wolfram|Alpha to get a code example, I input:

List of stars with a distance from the sun between 10 lightyears and 20 lightyears

and several other variations. It doesn’t understand my query.  
I have tried the Natural Language to no avail.  
Is there something I’m missing or does each property have a different way of filtering values?

---

<div class="post-metadata">

**Author:** ![wolframcommunity](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/wolframcommunity/32/8335_2.png) [@wolframcommunity](https://community.wolfram.com/u/wolframcommunity)\
**Post date:** [March 1, 2018, 5:30am UTC](https://community.wolfram.com/t/filter-data-from-stardata-based-on-distance-from-sun/12034/2 "2018-03-01T05:30:21Z")

</div>

Welcome to Wolfram Community! Please make sure you know the rules: [https://wolfr.am/READ-1ST](https://wolfr.am/READ-1ST)

The rules explain how to format your code properly. If you do not format code, it may become corrupted and useless to other members. Please **EDIT** your posts and make sure code blocks start on a new paragraph and look framed and colored like this.

```
int = Integrate[1/(x^3 - 1), x];
Map[Framed, int, Infinity]

```

 ![ScreenShot2017-04-28at9.43.33AM.png](https://global.discourse-cdn.com/wolfram/original/3X/f/3/f3367c082cbad32b79855f70628ea173f845653e.png)
