From 9aecde16051b9beee6a9c73271d1f64184873167 Mon Sep 17 00:00:00 2001 From: TimelordUK Date: Wed, 30 Sep 2026 12:32:30 +0100 Subject: [PATCH 1/2] chore(choco): serve iconUrl from jsdelivr, not raw.githubusercontent Chocolatey moderation rejects raw.githubusercontent.com as an icon host and asked for the jsdelivr CDN URL instead. Co-Authored-By: Claude Opus 5.5 (1M context) --- chocolatey/README.md | 1 + chocolatey/sql-cli.nuspec.template | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/chocolatey/README.md b/chocolatey/README.md index e5e10379..dc76a274 100644 --- a/chocolatey/README.md +++ b/chocolatey/README.md @@ -6,6 +6,7 @@ sql-cli to the [Chocolatey Community Repository](https://community.chocolatey.or ## Layout - `sql-cli.nuspec.template` — package metadata. `__VERSION__` is replaced at pack time. + `iconUrl` must stay on `cdn.jsdelivr.net`: moderation rejects `raw.githubusercontent.com`. - `tools/chocolateyInstall.ps1.template` — downloads the Windows binary from the matching GitHub release and verifies its SHA256. `__VERSION__` and `__CHECKSUM__` are replaced at pack time. diff --git a/chocolatey/sql-cli.nuspec.template b/chocolatey/sql-cli.nuspec.template index e1f4500f..e1f90212 100644 --- a/chocolatey/sql-cli.nuspec.template +++ b/chocolatey/sql-cli.nuspec.template @@ -12,7 +12,7 @@ https://github.com/TimelordUK/sql-cli/blob/main/README.md https://github.com/TimelordUK/sql-cli/issues https://github.com/TimelordUK/sql-cli/blob/main/LICENSE - https://raw.githubusercontent.com/TimelordUK/sql-cli/v__VERSION__/assets/icon.png + https://cdn.jsdelivr.net/gh/TimelordUK/sql-cli@v__VERSION__/assets/icon.png false Vim-like terminal SQL editor and engine for CSV / JSON / JSONL data. From 9848e16624ae5ac397a97224458317e65c32d2c2 Mon Sep 17 00:00:00 2001 From: TimelordUK Date: Thu, 1 Oct 2026 19:26:39 +0100 Subject: [PATCH 2/2] add county query --- examples/countries.sql | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/examples/countries.sql b/examples/countries.sql index c0434bd6..b35017ef 100644 --- a/examples/countries.sql +++ b/examples/countries.sql @@ -29,6 +29,39 @@ FROM #countries WHERE "name.common" = 'Russia'; go +-- using unnest to explode the borders on left hand side to self join back to get the matching row on right + +WITH + all AS ( + SELECT + "name.common" as name, + cca3, + latlng, + borders, + area + FROM #countries + ), + lc AS ( + SELECT + l.name as l_name, + l.cca3 AS iso, + l.latlng, + l.borders, + SPLIT_PART(l.latlng, ',', 1) AS lat, + SPLIT_PART(l.latlng, ',', 2) AS lon, + l.area, + Unnest(l.borders, ',' ) AS border + FROM all + WHERE l.cca3 = 'BRA' + ) +SELECT + lc.*, + r.latlng, + r.name as r_name +FROM lc +INNER JOIN all AS r ON l.border = r.cca3 +GO + SELECT "name.common" as name, region, cca3 as iso,