Basic SQL Structure

SELECT *
FROM Table;

This is as simple as it gets.


Simple Query

SELECT ID, NAME
FROM Table
WHERE ID = 3;

 

Finding Unique Values

SELECT DISTINCT NAME
FROM Table
GROUP BY NAME;

 

Counting Groups of Occurrences

SELECT DISTINCT NAME, COUNT(*)
FROM Table
GROUP BY NAME;

 

M