http://www.jitbit.com/news/181-jitbits-sql-interview-questions/
employees
- employee_id
- department_id
- boss_id
- name
| import argparse | |
| import base64 | |
| import os | |
| import zlib | |
| from pathlib import Path | |
| def convert(s): | |
| b = base64.b64decode(s.encode('ascii')) | |
| return zlib.decompress(b).decode('utf-8') |
| # Makefile | |
| # | |
| # Converts Markdown to other formats (HTML, PDF, DOCX, RTF, ODT, EPUB) using Pandoc | |
| # <http://johnmacfarlane.net/pandoc/> | |
| # | |
| # Run "make" (or "make all") to convert to all other formats | |
| # | |
| # Run "make clean" to delete converted files | |
| # Convert all files in this directory that have a .md suffix |
| -- JitBit SQL Interview Questions (Posted on Hacker News) | |
| -- http://www.jitbit.com/news/181-jitbits-sql-interview-questions/?utm_source=hackernewsletter&utm_medium=email | |
| -- Schema: | |
| -- employees table | |
| -- EmployeeID | |
| -- DepartmentID | |
| -- BossID | |
| -- Name | |
| -- Salary |
http://www.jitbit.com/news/181-jitbits-sql-interview-questions/
employees
Magic words:
psql -U postgresSome interesting flags (to see all, use -h or --help depending on your psql version):
-E: will describe the underlaying queries of the \ commands (cool for learning!)-l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)