Database Reference
In-Depth Information
[Hadoop.testdomain:21000] > select * from
motorcycles where year > 2010;
Query finished, fetching results ...
+---------+---------------+------+----------+--------+--------+--------+--------+-----------+-----------+-------+
| make | model | year | fueltype |
wheels | body | style | cc_rpm | highspeed |
automatic | price |
+---------+---------------+------+----------+--------+--------+--------+--------+-----------+-----------+-------+
| Harley | Tri Glide | 2012 | gas |
3 | deluxe | luxury | 1600 | 180 |
false | 35000 |
| Harley | Iron | 2012 | gas |
NULL | luxury | 1500 | 200 | NULL |
NULL | NULL |
| Bramo | Icon | 2012 | electric |
2 | casual | sport | 4500 | 80 |
false | 20000 |
| Zero | Police | 2013 | electric |
2 | casual | sport | 4300 | 95 |
false | 25000 |
| Can-am | spider | 2014 | gas |
3 | deluxe | luxury | 998 | 120 |
false | 22000 |
+---------+---------------+------+----------+--------+--------+--------+--------+-----------+-----------+-------+
Returned 5 row(s) in 0.61s
Now, we will try to get a list of unique automakers from both the automobiles and
motorcycles tables by using the distinct command as follows:
[Hadoop.testdomain:21000] > select
distinct(make) from automobiles;
Query finished, fetching results ...
+-----------+
| make |
+-----------+
| Mercedes |
| Audi |
Search WWH ::




Custom Search