# Compress forex tick data

**URL:** <https://community.influxdata.com/t/compress-forex-tick-data/3975>\
**Category:** Store\
**Tags:** influxdb\
**Created:** [February 12, 2018, 12:49pm UTC](https://community.influxdata.com/t/compress-forex-tick-data/3975 "2018-02-12T12:49:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cal97g](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/cal97g/32/1010_2.png) [@cal97g](https://community.influxdata.com/u/cal97g)\
**Post date:** [February 12, 2018, 12:49pm UTC](https://community.influxdata.com/t/compress-forex-tick-data/3975/1 "2018-02-12T12:49:30Z")

</div>

I have a lot of raw tick data in influx I need to compress down to OHCLV values per period.

For example I have a hundered ticks in “ticker”.“7d” and I need to run something like:

SELECT first(price) as “open”, low(price) as “low”, max(price) as “high”, last(price) as “close”, sum(quantity) as "volume"  
INTO ticker."30s"  
FROM ticker."tick"  
GROUP BY time(30s)

I have 800 measurements I need to do this on and it should eventually be a continuous query.

Any advice?
