I wrote some sql queries for Hive but the syntax is probably off a little