Seperate Files

This commit is contained in:
2021-10-21 09:48:17 -05:00
parent fed464e87e
commit 5092c10859
4 changed files with 136 additions and 97 deletions

30
CFY.sql
View File

@@ -1,3 +1,27 @@
-- SQLite
SELECT SUM(quantity) AS qty, SUM(revenue) AS rev
FROM data WHERE description LIKE "%RoboSHOT 30E USB%" AND date >= '2021-01-01';
WITH const as (select "%ROBOSHOT%" as target)
SELECT
description,
-- year,
-- month,
sum(revenue),
sum(quantity)
from
data
where
description like const.target
and year = 2021
and month BETWEEN 7
and 9
group by
description;
select
description,
sum(revenue),
sum(quantity)
from
data
where
description like const.target
and year = 2021
and month BETWEEN 7
and 9;