This document -- which has several characters that... usually fail to typeset well -- should export nicely, I hope.
ls -la | grep rcThis document -- which has several characters that... usually fail to typeset well -- should export nicely, I hope.
ls -la | grep rcIn a glass, combine:
Apply to face.
I hereby claim:
To claim this, I am signing this object:
| # Created 2016-04-17 Sun 21:14 | |
| #+TITLE: SQL | |
| #+AUTHOR: Ross Donaldson | |
| 1. Which food is the most liked? | |
| #+BEGIN_SRC sql | |
| SELECT food.name | |
| , COUNT(*) AS love_count | |
| FROM food | |
| LEFT JOIN preferences AS prefs | |
| ON food.id = prefs.food_id |
| # Installing Postgres | |
| First things first: installing a database. A database is its own kind of | |
| program; it needs to be run and managed separately from the code you write. Both | |
| the SQL and ORM approaches require a database, run in the same way. For our work | |
| here, we'll be using Postgres. | |
| You have two choices: [Postgres.app](http://postgresapp.com/), or homebrew. Both do pretty much the same | |
| thing: install a Postgres database and the `psql` CLI on your computer. Heroku's | |
| Postgres.app makes running your database slightly less arcane; the flip side is |