Day 14 of AOC we have new hands on SQL for the Distress Signal. This one uses lag(), sequencing, regexp_replace(), and overlay().
Day 13 of AOC we have new hands on SQL for the Distress Signal. This one uses lag(), sequencing, regexp_replace(), and overlay().
Day 12 of AOC we have new hands on SQL for the Hill Climbing Algorithm. This one uses parsing, an IDENTITY column, functions, and text arrays.
Day 11 of AOC we have new hands on SQL for playing Monkey in the Middle. This one uses sequences, string functions, and window functions.
Day 10 of AOC we have new hands on SQL for reading signals. This one uses sequences and the OVER() function.
Day 9 of AOC we have new hands on SQL for looking at a rope bridge. This one uses a custom function and colored ASCII art.
Day 8 of AOC we have new hands on SQL for reviewing treetop views. This one uses includes plpgsql, row_number window functions, sequences, and regexp_split_to_table.
Day 7 of AOC we have new hands on SQL for reviewing terminal commands. This one uses recursive queries, text arrays and so many functions. Bonus, there are functions for regexp_count, regexp_replace, and regexp_substr which are new in Postgres 15.
Day 6 of AOC we have new hands on SQL detecting markers in datastreams. This one uses regexp_split_to_table, strpos, lag() functions and COUNT(DISTINCT). Also, a great example of using a DO function with RAISE NOTICE.
Day 5 of AOC we have new hands on SQL for helping stack crates. There are some cool plpgsql for moving things around. Plus generate_series(), upsert ON CONFLICT, and backwards sequencing.
Day 4 of AOC we have new hands on SQL for helping the Elves cleaning up camp. Postgres solutions include the function split_part(), the int4range data type, and range operators.
Day 3 of AOC we have lots of great SQL for organizing a rucksack. Postgres solutions for this one include functions for length(), left(), right(), regexp_replace(), COLLATE commands, window function lag(), and more.
Day 2 of AOC we have sql for transforming raw data into game analysis of paper, rock, scissors. Included is a nice custom function and great examples for IF/ELSE, CTEs, and more.
Greg is doing the Advent of Code using PostgreSQL and he is going to share a few of his tricks. Day 1 he uses file_fdw to connect to the text file provided. Along with a couple grouping and sum queries, he has a quick solution for you.
Learn how to do percentage calculations in one-pass. Sample data and queries for basic use of window functions.
If you've ever wondered - What is a tuple? What is a Postgres page? What's the difference between a record and a row? What is a relation? What's an array? What is TOAST? This post is for you! These are terms you hear all the time in the Postgres world. This post breaks down what these terms mean and how they are used.
This post covers many ways to get data in Postgres including csv, json, backup files, foreign data wrappers, and generating data with queries. Examples include simple steps you can copy and reuse.