DISTINCT Keyword in SQL
Level 239 keystrokes
DISTINCT removes duplicate values from the result set.
SQL code
1SELECT -- DISTINCT returns each category value only once2 DISTINCT category-- Reads from products; without ORDER BY the row order may differ3FROM4 products;Output
+-------------+ | category | +-------------+ | Electronics | | Clothing | | Books | +-------------+ 3 rows in set
Practice typing this code. Results are not recorded in the rankings.
Symbols in this code
The symbols you type in this SQL code and how often they appear.
;× 1