SQL

Introduction

Structured Query Language. Keywords are case insensitive.

DBMS notes

mySQL using Docker

A basic working SQL server.

Pull docker image. Create a network. Start a server in a container. Create a client container and access the server.

Video

Commands

REGEX

AGGREGATION

GROUP BY

JOINS

UNION => DISTINCT

UNION ALL => DUPLICATES allowed

Curated Questions

1. Query even ID numbers in table STATION.

2. Query to find the difference between the total number of cities and the unique number of cities in the table STATION.

3. Query city with the longest name from table STATION

4. Query the list of CITY names starting with vowels (i.e., a, e, i, o, or u) from STATION. Result cannot contain duplicates.