Closed xayaraj closed 3 years ago
Long time ago I had the same question: https://github.com/sqlkata/querybuilder/issues/359 I had to write all of those helpers by myself. 100% strong type.
QueryHelper.cs:
Usage:
Hope it helps
Wow. This should be a good starting point for me. Thank you for your help. Appreciate that.
Need help to build sqlkata query without using "SelectRaw" and "WhereRaw" functions for the sql script below. The difficulty that I found is to not using sql "Date_Add" function. I am somewhat new to sqlkata library. My goal is to master this sql builder framework. Need some guidance. Thanks.
select ShipCountry, avg(Freight) as AverageFreight from northwind.orders where OrderDate >= Date_Add((select max(orderdate) from northwind.orders), interval -12 month) group by ShipCountry order by AverageFreight desc limit 3;