moved all of the sql logic to hbase for figg