Last active
March 9, 2022 01:51
-
-
Save YiLi225/2370e1e2b5eaa146f9c25934ec58d290 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Query with placeholders | |
timeSeries_query = f""" | |
SELECT | |
InvoiceDate, | |
Description, | |
ROUND(SUM(Quantity * UnitPrice), 2) AS Total_Sale_Amt | |
FROM | |
OnlineRetail | |
WHERE InvoiceDate BETWEEN {date} ## !!! Placeholder for date | |
AND Description IN ('{product}') ## !!! Placeholder for product | |
GROUP BY InvoiceDate, Description | |
ORDER BY InvoiceDate | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment