Learning SQL the hard way