File for my SQL Queries Wizardry presentation
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
README.md
SQL Queries Wizardry.pptx
contest_pivot_table.sql
contest_scores_generator.rb
dump.sql
login_data_generator.rb
nus_students_generator.rb
students_from_top_three_faculties.sql
top_domains_per_country.sql

README.md

sql-wizardry

File for my SQL Queries Wizardry presentation

Instructions

  • The dump.sql file is the SQL dump file generated by pg_dump. To import them, run, for example: cat dump.sql | sudo -u postgres psql
  • The Ruby files generate the insert statements. Code quality sort of sucks, I'm sorry. To import them to your database, run, for example: ruby contest_scores_generator.rb | sudo -u postgres psql
  • The SQL files contain the queries as referenced in the presentation. To run them, type, for example: cat contest_pivot_table.sql | sudo -u postgres psql