actually allow to infer float types
[sqlgg.git] / sql / some.sql
blob95b09a89e8fe6548f011282f222a0c5d6987f0ea
1 create table [OrderLine] (Id int, OrderId int, ProductId int, Qty int, Status int);
2 create table [Product] (Id int, Name text, Price float);
4 select OrderId, count(*) 
5 from OrderLine
6 group by OrderId
7 having count(*) > @cnt;
9 -- update %s;
11 select sum(p.Price * ol.Qty) as Price
12 from OrderLine ol
13 inner join Product p on ol.ProductId = p.Id
14 where ol.OrderId = @id;