Skip to content

Tag: sql

disaggregate 3d time periods into daily

table_1 shows the aggregation of the revenue by different geographies I would like to disaggregate the 3d period to daily: table_2 as a next step, I would like to also change the table_2 format into table_3: From table_1 to table_2, I am not sure. From table_2 to table_3, I am thinking of: With the code above…

Update with a subquery and a join

How do I update table1 with results of this query – I want to do something like this – Answer This question has been answered many times in SO… anyway, the query should be built this way One option Other option Surely there are other additional ways…

SQL WHERE statement returning both or conditions

I’m trying to return a single row based on this where statement The issue is I have to get a row based on multiple criteria and the more that match determines the final match. The statement above returns a row just fine if it matches the bottom or statement, but if it matches the first OR it returns res…

InfluxQL: tag called Group causing grief

I have to work with an influxDB database and one of the tags is called Group. For example the query select * from Testing limit 10 returns The problem is when I try to have a rule based on group, e.g. I get an error that says ERR: error parsing query: found GROUP, expected identifier, string, number, bool at …