SQL Syntaxes
Select data from a table To select all(*) the data from a table SELECT * FROM TABLE_NAME; To select specific columns of a table SELECT COLUMN_1, COLUMN_2,..., COLUMN_n FROM TABLE_NAME; ; DISTINCT - To select distinct(different) values SELECT DISTINCT COLUMN_1, COLUMN_2,..., COLUMN_n FROM TABLE_NAME; To list the number of distinct rows SELECT COUNT(DISTINCT COLUMN_NAME) FROM TABLE_NAME; or SELECT COUNT(*) AS COLUMN_NAME_IDENTIFIER FROM (SELECT DISTINCT COLUMN_NAME FROM TABLE_NAME); To give a condition to the select statement SELECT COLUMN_1, COLUMN_2,...,COLUMN_n FROM TABLE_NAME WHERE condition When using the WHERE condition, 1. if it's an integer COLUMN_NAME = INT_VALUE 2. if it's a string (single quotation is required) COLUMN_NAME = 'STRING_VALUE' 3. if it's a date (single quotation is required and the format must be YYYY-MM-DD) COLUMN_NAME = 'YEAR-MONTH-DATE' Using AND syntax with WHERE con...