Updated queries 23

This commit is contained in:
vlyubin 2017-05-15 17:30:20 +02:00
parent e8f85b0b0e
commit e5dc6f338f
2 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@
from store_sales, customer
where ss_customer_sk = c_customer_sk
group by c_customer_sk
having sum(ss_quantity*ss_sales_price) > (50/100.0) *
having sum(ss_quantity*ss_sales_price) > (95/100.0) *
(select * from max_store_sales))
select sum(sales)
from (select cs_quantity*cs_list_price sales

View File

@ -23,7 +23,7 @@
,customer
where ss_customer_sk = c_customer_sk
group by c_customer_sk
having sum(ss_quantity*ss_sales_price) > (50/100.0) *
having sum(ss_quantity*ss_sales_price) > (95/100.0) *
(select * from max_store_sales))
select c_last_name,c_first_name,sales
from ((select c_last_name,c_first_name,sum(cs_quantity*cs_list_price) sales