27 lines
401 B
SQL
27 lines
401 B
SQL
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; |