Skip to content

Instantly share code, notes, and snippets.

View dsartori's full-sized avatar
🚩

dsartori

🚩
View GitHub Profile
@dsartori
dsartori / mssql-docker-compose.yml
Created April 25, 2024 17:38 — forked from jjuanrivvera99/mssql-docker-compose.yml
SQL Server with Docker Compose
version: '3.3'
services:
mssql:
container_name: sql-server
image: mcr.microsoft.com/mssql/server:2017-latest
#image: mcr.microsoft.com/mssql/server:2017-CU11-ubuntu
restart: always
environment:
ACCEPT_EULA: "Y"
[
{"geo":"Newfoundland and Labrador",
"46,605 or less":{
"percent of tax":14.04,
"percent of population":69.41},
"46,605 - 93,208":{
"percent of tax":38.32,
"percent of population":23.07},
"93,208 - 144,489":{
"percent of tax":20.65,
DROP TABLE IF EXISTS #VotesCast
SELECT
e.ECNumber,
e.EcNameEn,
SUM(CASE WHEN e.electionyear = 2015 THEN pr.votes ELSE 0 END) AS Votes2015,
SUM(CASE WHEN e.electionyear = 2019 THEN pr.votes ELSE 0 END) AS Votes2019,
SUM(CASE WHEN e.electionyear = 2021 THEN pr.votes ELSE 0 END) AS Votes2021
INTO #VotesCast
FROM pollresult pr