SQL Notes

Contents

Intro

This is not going to be a full SQL tutorial (expansive topic) but mostly just notes for myself to reference for a specific project, they may be useful for others however. I am going to be working mostly with a partitioned Data Catalog in AWS Athena.

Query a specific partition

SELECT campaignid as "Campaign ID",
	campaignname as "Campaign Name",
	impressions as "Impressions",
	profile_id
FROM "AwsDataCatalog"."name_of_database"."name_of_table"

WHERE CAST(profile_id as bigint) = 1363579156439011

limit 10;