SQL Key Words Flashcards
What will you use for getting special column from a table?
SELECT
FROM
How to tell SQL where the end of your query is?
;(semicolon)
If you want to return a certain number of results, what can you use?
LIMIT
If you want to select all the unique values from a column, what can you use?
If use Numpy, what can you use?
DISTINCT
numpy.unique(sequence)
If you want to know how many rows in a table, what can you use?
How many non-missing values in a column, what can you use?
COUNT(*)
COUNT()
If you want to filter based on both text and numeric values in a table, it is often with comparison operators and comes after the FROM, what can you use?
WHERE
In SQL, what can you use for not equal operator? As per the SQL standard.
<>
Which version of SQL you will use single quotes with WHERE, like ‘WHERE’?
PostgreSQL
Using IOS date format, what January 22th,2008 will be?
‘2008-01-22’
If you want to select data based on multiple conditions, what the keyword can you build up your WHERE queries by combining multiple conditions with?
AND
What will you need to specify separately for every AND condition?
the column name For example : SELECT title FROM films WHERE release_year > 1991 AND release_year < 2008
If you want to select rows that meet some but not all conditions, what will you use?
AND
OR
Displaying rows that meet one of the specified conditions, what can you use?
OR
What can you use alternatively like the following: SELECT * FROM people WHERE age >= 10 AND age <= 14;
SELECT *
FROM people
WHERE age
BETWEEN 10 AND 14;
Checking for range in SQL, what can you use?
It is not like range() in Python, cause it’s inclusive.
BETWEEN