Free Cookbook
SQL Cookbook
Master SQL through practical lessons with real data examples, code patterns, and solutions.
Lessons
- How to find rows with maximum value in SQL
- How to add a column in SQL
- How to add days to a date with SQL
- How to add ranking positions of rows with RANK in SQL
- How to calculate a square root in SQL
- How to calculate the difference between two dates in SQL
- How to capitalize the first letter of every word with SQL
- How to check if not equal in SQL
- How to check the length of a string in SQL
- How to combine the results of two queries in SQL
- How to comment in SQL
- How to compare two dates in the WHERE clause with SQL
- How to compare two strings in SQL
- How to concatenate strings in SQL
- How to convert a string to a date in SQL
- How to convert a string to a numeric value in SQL
- How to convert a string to uppercase in SQL
- How to count distinct values in SQL
- How to create a table with a foreign key in SQL
- How to delete a row in SQL
- How to drop a table in SQL
- How to eliminate duplicate rows in SQL
- How to extract a substring from a string with SQL
- How to filter records with an aggregate function AVG in SQL
- How to filter records with an aggregate function COUNT in SQL
- How to filter records with an aggregate function SUM in SQL
- How to find duplicate rows in SQL
- How to find the average of a numeric column in SQL
- How to format a date with SQL
- How to get the current date and time in SQL
- How to group by month in SQL
- How to handle divide by zero in SQL
- How to insert multiple rows with SQL
- How to join multiple tables in one statement with SQL
- How to limit results in SQL
- How to order rows by group sum in SQL
- How to remove a primary key in SQL
- How to round numbers in SQL
- How to select the first row in each group by group with SQL
- How to sort in SQL
- How to split a string in SQL
- How to subtract one value from another with SQL
- How to sum values of a column in SQL
- How to trim strings in SQL
- How to use DISTINCT in SQL
- How to use LIKE in SQL
- How to write a CASE statement in SQL