assert.Equal(t,"SELECT YEAR(traded_at) AS year, MONTH(traded_at) AS month, SUM(quantity * price) AS quote_volume FROM trades WHERE traded_at > :start_time GROUP BY MONTH(traded_at), YEAR(traded_at) ORDER BY year ASC, month ASC",generateMysqlTradingVolumeQuerySQL(o))
assert.Equal(t,"SELECT YEAR(traded_at) AS year, SUM(quantity * price) AS quote_volume FROM trades WHERE traded_at > :start_time GROUP BY YEAR(traded_at) ORDER BY year ASC",generateMysqlTradingVolumeQuerySQL(o))
expectedDefaultSQL:="SELECT YEAR(traded_at) AS year, MONTH(traded_at) AS month, DAY(traded_at) AS day, SUM(quantity * price) AS quote_volume FROM trades WHERE traded_at > :start_time GROUP BY DAY(traded_at), MONTH(traded_at), YEAR(traded_at) ORDER BY year ASC, month ASC, day ASC"
assert.Equal(t,"SELECT * FROM trades WHERE exchange = :exchange ORDER BY gid ASC LIMIT 500",queryTradesSQL(QueryTradesOptions{Exchange:"max",Limit:500}))
assert.Equal(t,"SELECT * FROM trades WHERE gid > :gid ORDER BY gid ASC LIMIT 500",queryTradesSQL(QueryTradesOptions{LastGID:1,Limit:500}))
assert.Equal(t,"SELECT * FROM trades WHERE gid > :gid ORDER BY gid ASC LIMIT 500",queryTradesSQL(QueryTradesOptions{LastGID:1,Ordering:"ASC",Limit:500}))
assert.Equal(t,"SELECT * FROM trades WHERE gid < :gid ORDER BY gid DESC LIMIT 500",queryTradesSQL(QueryTradesOptions{LastGID:1,Ordering:"DESC",Limit:500}))
assert.Equal(t,"SELECT * FROM trades WHERE gid < :gid AND symbol = :symbol AND exchange = :exchange ORDER BY gid DESC LIMIT 500",queryTradesSQL(QueryTradesOptions{