Writing SQL Queries

 

Before you can write a SQL Query, you'll need to add data sources the way you normally would. Once your data is added to the Build screen, click the code icon < /> shown below.

Your Build screen will transform into a SQL workbench, showing your added datasets on the right, and a SQL editor on the left.

If you need to preview available columns, click the dropdown on the Datasets on the right. Clicking a column name will add it to the SQL editor. Clicking ADD will add the table name to the SQL Editor. This might be helpful because you need to prefix the dataset name with the folder name. (i.e. "cust"."cust_inventory_addresses" instead of just "cust_inventory_addresses")

Click the Run button at the bottom of the editor window to run the Query. You'll see results appear below.

Once your query is finished, click Save and save the dataset as usual.


Did this help answer your question?

thumbs up
thumbs down

Thanks for the feedback! 🙏🏽


Help by drift