# Filtering by Numerical Values
__*BETWEEN... AND operation*__
+ Which planets are more than **100,000** km in diameter?
+ Find the names of planets with asteroid rings and their masses
+ Find the names of planets with average temperatures between minus **80** degrees Celsius to **200** degrees Celsius (inclusive) and their gravitational acceleration
```12
SELECT name FROM planets WHERE diameter ~!@> 100000@!~;
SELECT name, mass FROM planets WHERE ring_systems ~!@= 1@!~;
SELECT name, gravity FROM planets WHERE mean_temperature ~!@BETWEEN -80 AND 200@!~;
```

------------------------------------------------------------
Review the column notes on the planet table to understand the meaning of each column.

```
tidb> SELECT column_name, column_comment 
    > FROM information_schema.columns 
    > WHERE table_schema='universe' AND table_name='planets';
+-----------------------+----------------+
| column_name           | column_comment |
+-----------------------+----------------+
| id                    |                |
| name                  |                |
| mass                  | 10**24 kg      |
| diameter              | km             |
| density               | kg/m**3        |
| gravity               | m/s**2         |
| escape_velocity       | km/s           |
| rotation_period       | hours          |
| length_of_day         | hours          |
| distance_from_sun     | 10**6 km       |
| perihelion            | 10**6 km       |
| aphelion              | 10**6 km       |
| orbital_period        | days           |
| orbital_velocity      | km/s           |
| orbital_inclination   | degrees        |
| orbital_eccentricity  |                |
| obliquity_to_orbit    | degrees        |
| mean_temperature      | C              |
| surface_pressure      | bars           |
| ring_systems          |                |
| global_magnetic_field |                |
| sun_id                |                |
| category_id           |                |
+-----------------------+----------------+
23 rows in set (0.02 sec)

tidb> SELECT name FROM planets WHERE diameter > 100000;
+---------+
| name    |
+---------+
| Jupiter |
| Saturn  |
+---------+
2 rows in set (0.01 sec)

tidb> SELECT name, mass FROM planets WHERE ring_systems = 1;
+---------+------+
| name    | mass |
+---------+------+
| Jupiter | 1898 |
| Saturn  |  568 |
| Uranus  | 86.8 |
| Neptune |  102 |
+---------+------+
4 rows in set (0.00 sec)

tidb> SELECT name, mean_temperature, gravity FROM planets WHERE mean_temperature BETWEEN -80 AND 200;
+---------+------------------+---------+
| name    | mean_temperature | gravity |
+---------+------------------+---------+
| Mercury |              167 |     3.7 |
| Earth   |               15 |     9.8 |
| Mars    |              -65 |     3.7 |
+---------+------------------+---------+
3 rows in set (0.00 sec)
```
