Skip to content

Latest commit

History

35 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Advent of SQL 2024

★ Advent of SQL 2024 is solved using PostgreSQL.

StarDayLevelTopics
Day 01 - Santa's Gift List ParserBeginnerjson, case, joins
Day 02 - Santa's jumbled lettersBeginnerunion, cte, ascii, array_agg
Day 03 - The greatest Christmas dinner ever!Intermediate
Day 04 - The Great Toy Tag Migration of 2024Beginnerarrays, set operations
Day 05 - Santa's production dashboardBeginnerlag, round, window functions
Day 06 - Making presents fairerBeginnersubquery, aggregates
Day 07 - Santa's Cartesian Elf Skill-Matching ProgramIntermediatecte, window functions
Day 08 -
Day 09 - Reindeer Training RecordsIntermediatecte, aggregate functions
Day 10 - The Christmas party drinking listIntermediatepivot, cte
Day 11 - The Christmas tree famineIntermediateAverage over, window functions
Day 12 - The Great Gift RankingIntermediatepercentile, window functions
Day 13 - Santas Christmas card listIntermediatewindow functions, temporary tables, Array agg
Day 14 - Where is Santa's green suit?Intermediatearray functions, json functions
Day 15 - Santa is missing!AdvancedGeometry
Day 16 - Santa's Delivery Time AnalysisAdvancedLAG, Geometry, Lead, CTE
Day 17 - Christmas time zone madnessIntermediatecte, timezone

Init

--- how to create a password-- echo -n pass+user | md5sum--- echo -n asdfg1234advent_of_sql | md5sum--- asdfg1234 + advent_of_sql i.e. asdfg1234advent_of_sql--- asdfg1234 is the password--- advent_of_sql is the user--- prefix with md5 i.e. md5$hash$DROPDATABASE IF EXISTS advent_of_sql;
DROP ROLE IF EXISTS advent_of_sql;
CREATE ROLE advent_of_sql WITH
LOGIN
NOSUPERUSER
NOINHERIT
CREATEDB
NOCREATEROLE
NOREPLICATION
PASSWORD 'md52414c1e35431797cd193111ed64eb67b'
VALID UNTIL 'infinity';
CREATEDATABASEadvent_of_sql WITH
OWNER = advent_of_sql
ENCODING ='UTF8' TABLESPACE = pg_default
CONNECTION LIMIT=-1;
echo"127.0.0.1:5432:*:advent_of_sql:advent_of_sql">>~/.pgpass
# may overwrite you config file# cp .psqlrc ~/.psqlrc

License

MIT License.

Copyright (c) 2024 Manuel Alejandro Gómez Nicasio az-dev@outlook.com

See LICENSE.md for details.

About

**UNOFFICIAL REPOSITORY** Advent of SQL

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Used by

Contributors

Languages