From fcf7cd5e2ceeec969bafa900de12b6aaa4d065c9 Mon Sep 17 00:00:00 2001 From: Hugo Queiroz Date: Sun, 14 Jun 2026 11:05:41 -0700 Subject: [PATCH] Polish Seattle safety demo queries --- .gitignore | 1 + AzureSQLDatabase/SeattleSafety/01-AdHocExploration.sql | 4 ++-- AzureSQLDatabase/SeattleSafety/05b-PerformanceTests.sql | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..496ee2c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store \ No newline at end of file diff --git a/AzureSQLDatabase/SeattleSafety/01-AdHocExploration.sql b/AzureSQLDatabase/SeattleSafety/01-AdHocExploration.sql index 3f1c7d7..be54d66 100644 --- a/AzureSQLDatabase/SeattleSafety/01-AdHocExploration.sql +++ b/AzureSQLDatabase/SeattleSafety/01-AdHocExploration.sql @@ -72,8 +72,8 @@ GO -- Useful to understand how the data is physically organized. SELECT - [SeattleSafety].filename() AS [file_name] - ,COUNT(*) AS [row_count] + [SeattleSafety].filename() AS [file_name], + COUNT(*) AS [row_count] FROM OPENROWSET( BULK 'abs://citydatacontainer@azureopendatastorage.blob.core.windows.net/Safety/Release/city=Seattle/*.parquet', FORMAT = 'PARQUET' diff --git a/AzureSQLDatabase/SeattleSafety/05b-PerformanceTests.sql b/AzureSQLDatabase/SeattleSafety/05b-PerformanceTests.sql index bc3b660..1f7054e 100644 --- a/AzureSQLDatabase/SeattleSafety/05b-PerformanceTests.sql +++ b/AzureSQLDatabase/SeattleSafety/05b-PerformanceTests.sql @@ -75,7 +75,8 @@ SELECT s.name AS stat_name, c.name AS column_name FROM sys.stats s JOIN sys.stats_columns sc ON s.object_id = sc.object_id AND s.stats_id = sc.stats_id JOIN sys.columns c ON sc.object_id = c.object_id AND sc.column_id = c.column_id -WHERE s.object_id = OBJECT_ID('dbo.SeattleSafety_Cold'); +WHERE s.object_id = OBJECT_ID('dbo.SeattleSafety_Cold') +ORDER BY s.name, c.column_id; GO -- Enable actual execution plan (Ctrl+M) before running these.