Prompt Details
Model
Completion - GPT-3.5 (text-davinci-003)
Token size
85 ($0.00170 / call)
Example input
Select companyName, assetName, year,\n\nSum(DatapointValue) as MPPOilRevised\n\nFrom PEBaseQuery
Example output
The SQL query:
sql
Copy code
(Select companyName, assetName, year,
Sum(DatapointValue) as MPPOilRevised
From PEBaseQuery
where DatapointID in (2032, 2034, 2042, 2036)
group by companyName, assetName, year)
can be translated to Spark SQL as:
python
Copy code
spark.sql("""
SELECT companyName, assetName, year, SUM(DatapointValue) as MPPOilRevised
FROM PEBaseQuery
WHERE DatapointID IN (2032, 2034, 2042, 2036)
GROUP BY companyName, assetName, year
""")
Get this prompt + 9 more with Select$14 your first month, then $19/mo$14 first month, then $19/mo
View SelectBy purchasing this prompt, you agree to our terms of service
TEXT-DAVINCI-003
Convert snip code of SQL to Spark SQL including dataframe API and AWS Dataframe API
...more
Added over 1 month ago

