Fixed query errors

* Also fixed mispelling in sample_data.sql