I currently have this code to filter out data to anothertable:
SELECT sym, tstamp, COUNT(*) AS trades FR