I need to ask you what would be the code for date parameters to use sql query in excel?
SELECT TOP 10 T1.ItemCode,
MAX(T1.Dscription) as 'Item Description',
SUM(T1.LineTotal) as 'Amount(LC)'
FROM dbo.OINV T0
INNER JOIN dbo.INV1 T1 ON T1.DocEntry = T0.DocEntry
WHERE T0.docdate >= _________ and T0.docdate <= __________
AND T0.doctype = 'I'
GROUP BY T1.ItemCode
ORDER BY SUM(T1.LineTotal) DESC