Example databases and tables (sqlfiddle)

Ref

  • https://stackoverflow.com/questions/34901258/are-there-sample-tables-on-sqlfiddle

Convert SQL syntax

  • http://www.sqlines.com/online

Example Databases and Tables

  • Auto Shop Database:
    • http://sqlfiddle.com/#!9/ff1d04 (MySQL)
    • http://sqlfiddle.com/#!17/cd354 (PostgreSQL)
    • https://stackoverflow.com/a/46380990
-- Relationships between tables
-- Each Department may have 0 or more Employees
-- Each Employee may have 0 or 1 Manager
-- Each Customer may have 0 or more Cars
  • Library Database:
    • http://sqlfiddle.com/#!9/ba7ded (MySQL)
    • http://sqlfiddle.com/#!17/bcb8db (PostgreSQL)
    • https://stackoverflow.com/a/46381062
-- Relationships between tables
-- Each author can have 1 or more books
-- Each book can have 1 or more authors
  • Countries Table:
    • http://sqlfiddle.com/#!9/c7b3c2 (MySQL)
    • http://sqlfiddle.com/#!17/9d226 (PostgreSQL)
    • https://stackoverflow.com/a/46381130