Search Results for: Revenue
(q ) list the total revenue (sum of quantity times price of items) for each order. from orders as o, o.items as i group by o.orderno select o.orderno, sum(i.qty * i.price) as revenue order by o.orderno; result: [ { "orderno": , "revenue": }, { "orderno": , "revenue": }, { "orderno": , "revenue": }, .
problem by using a let clause to define revenue, as follows: (q ) list the total revenue (sum of quantity times price of items) for each order whose revenue is greater than . query blocks | from orders as o, o.items as i group by o.orderno let revenue = sum(i.qty * i.price) having revenue > select o.orderno...
https://asterixdb.apache.org/files/SQL_Book.pdf
(q ) list the total revenue (sum of quantity times price of items) for each order. from orders as o, o.items as i group by o.orderno select o.orderno, sum(i.qty * i.price) as revenue order by o.orderno; result: [ { "orderno": , "revenue": }, { "orderno": , "revenue": }, { "orderno": , "revenue": }, .
problem by using a let clause to define revenue, as follows: (q ) list the total revenue (sum of quantity times price of items) for each order whose revenue is greater than . query blocks | from orders as o, o.items as i group by o.orderno let revenue = sum(i.qty * i.price) having revenue > select o.orderno...
http://asterixdb.apache.org/files/SQL_Book.pdf