Posts for: #Sql

Advent of SQL 2025 Day 4: WinterFest Volunteers

Advent of SQL Day 4 WinterFest Volunteers

It is day 4 of advent of SQL.

No fuss, straight to the problem, the elves and humans are getting dumber as the days progress.

Let’s download the SQL inserts for the day.

And load it into a SQLite shell.

DROP TABLE IF EXISTS official_shifts;
DROP TABLE IF EXISTS last_minute_signups;

CREATE TABLE official_shifts (
    id INT PRIMARY KEY,
    volunteer_name TEXT,
    role TEXT,
    shift_time TEXT,
    age_group TEXT,
    code TEXT
);

CREATE TABLE last_minute_signups (
    id INT PRIMARY KEY,
    volunteer_name TEXT,
    assigned_task TEXT,
    time_slot TEXT
);

INSERT INTO official_shifts (id, volunteer_name, role, shift_time, age_group, code) VALUES
    (1, 'Jude Thompson', 'choir_assistant', '12:00 PM', 'senior', NULL),
    (2, 'Mateo Cruz', 'choir_assistant', '12:00 PM', 'senior', NULL),
    (3, 'Olivia Dubois', 'choir_assistant', '2:00 PM', 'teen', 'A1'),
    (4, 'Jeff Bezos', 'choir_assistant', '10:00 AM', 'adult', 'X7'),
    (5, 'Kian Rahimi', 'stage_setup', '12:00 PM', 'adult', 'X7'),
    (6, 'Haruto Sato', 'cocoa_station', '10:00 AM', 'adult', 'X7'),
    (7, 'Uma Singh', 'parking_support', '10:00 AM', 'adult', NULL),
    (8, 'Owen Scott', 'parking_support', '10:00 AM', 'adult', 'X7'),
    (9, 'Adil Rahman', 'stage_setup', '2:00 PM', 'adult', 'A1'),
    (10, 'Aaron Diaz', 'choir_assistant', '2:00 PM', 'senior', 'X7'),
    (11, 'Carter Lewis', 'cocoa_station', '10:00 AM', 'senior', 'B2'),
    (12, 'Anya Pavlov', 'stage_setup', '10:00 AM', 'senior', 'OLD'),
    (13, 'Ethan Brown', 'stage_setup', '2:00 PM', 'adult', 'A1'),
    (14, 'Lucia Fernandez', 'choir_assistant', '12:00 PM', 'senior', 'X7'),
    (15, 'Casey Morgan', 'choir_assistant', '12:00 PM', 'teen', 'OLD');

INSERT INTO last_minute_signups (id, volunteer_name, assigned_task, time_slot) VALUES
    (1, 'Jude Thompson', 'Choir', 'noon'),
    (2, 'Mateo Cruz', 'choir', 'noon'),
    (3, 'Olivia Dubois', 'choir', '2 PM'),
    (4, 'Jeff Bezos', 'choir assistant', '10AM'),
    (5, 'Kian Rahimi', 'stage setup', 'noon'),
    (6, 'Haruto Sato', 'cocoa station', '10AM'),
    (7, 'Uma Singh', 'parking_support', '10AM'),
    (8, 'Owen Scott', 'parking', '10AM'),
    (9, 'Adil Rahman', 'Stage-Setup', '2 PM'),
    (10, 'Aaron Diaz', 'Choir', '2 PM'),
    (11, 'Carter Lewis', 'Cocoa Station', '10AM'),
    (12, 'Anya Pavlov', 'stage_setup', '10AM'),
    (13, 'Olivia Brown', 'stage setup', '2 PM'),
    (14, 'Lena Fischer', 'cocoa station', '2 pm'),
    (15, 'Nolan Murphy', 'parking-support', '10AM');

Once the data is loaded, let’s sneak peak.

[]

Techstructive Weekly #73

Week 73

A pretty slow and sluggish week, but some momentum carried in the end. There was a disappointment after a glimmer of excitement when gemini 3 Flash dropped for the experiments that I was running for extraction of documents. It was maybe just the timing, but after this seeing code execution from chats, it was amazing. A good end to the work week.

I have continued to write Advent of SQL for the past 4 days, and brought back the streak of writing SQLog. I was not able to ship some code over the past weekend. But this weekend, I am pumped. I have time sorted out. Would be shipping some improvements in the website. Oh! I actually added snowball and particles based on season on my website (only index and post pages).

[]

Advent of SQL 2025 Day 3: Hotline Messages

Advent of SQL Day 3 - Hotline Messages

This is day 3 from the Advent of SQL

Grab the SQL Statements

Let’s take the insert statements i.e. to create and populate tables and rows into the database. I am using SQLite.

It works without any special shenanigans, as it was intended to used for Postgres, but the table and use case looks very simple, so nothing specific to Postgres used yet! We are good!

[]

Advent of SQL 2025 Day 2: Snowballs

SQLog: Advent of SQL Day 2

Here we are on the day 2 of Advent of SQL

As I said in the previous day this is in SQLite so I won’t be doing it in the playground. So here is your SQLite playground :)

SELECT 1;

From now on no setup straight to the problem!

Let’s download the .sql file for today’s problem to see what data we are playing with.

[]

Advent of SQL 2025: Wish List

Learning SQLite: Advent of SQL Day 1

I am trying to learn SQLite, I want to understand that database. It’s quite simple yet the whole world uses it for various kinds of things ranging from developers’ toy database to spaceships. What a tiny engineering marvel!

I am happy to see this happening: Advent of SQL

What a better time to learn more. I guess I want to start by exploring all the specificities of the INSERT statement in SQLite after exploring most of the things of the CREATE TABLE statement.

[]

Techstructive Weekly #72

Week #72

A good productive week (I am not sure, I am saying that in the last month of 2025). I would be writing a yearly review in a couple of weeks and this week might lift my spirits up. I was fresh, given time off from work, not really, but given the time to experiment.

Just use Postgres

Just use Postgres

Link: https://youtu.be/IdyK8XB2l6g

Context

Wow! I love this. I want to write a technical book too. It is such a great adventure to be in. But burnout seems to be stronger there. I love Postgres can be used as a message queue, gen ai application, full text search I knew and JSON was obvious. Getting deep into the tech is important, I need to focus on thing at a time.

[]

SQLITE SQL: Create Table with STRICT Option

We have seen how to create TABLE loosely Not adhering to the types. Because if we create a table with column name of type text, and insert a integer, it will happily store it as text. It is very flexible as we saw. So, in such CREATE TABLE statement in SQLite, without the STRICT constraint, the types don’t matter.

If you created a table with column type as XYZ it will accept it, because it really doesn’t see that. It will see the data coming in from the insert statement and store it whatever it thinks is the best one for that piece of data. Look at the below example:

[]

Techstructive Weekly #72

Week #72

A good productive week (I am not sure, I am saying that in the last month of 2025). I would be writing a yearly review in a couple of weeks and this week might lift my spirits up. I was fresh, given time off from work, not really, but given the time to experiment.

I read a lot, fiction, technical, even philosophical, and random Hacker News articles. I read 2 books of Harry Potter. I haven’t read Harry Potter, I have watched the first 3 movies, but not books. I enjoyed it, it was subtly different from movies, I missed the quote “What an Idiot” from the movies, it was not in the book, i was disappointed but the atmospheric adventures was amazing read.

[]

Techstructive Weekly 68

Week #68

It was a great week. A consistent clean week. I wrote around 9k words on my project. I feel good again. I didn’t do much on the weekends as usual. I am slowing down. I did a lot of things at work, experiments, and more experiments on VLLMs and parsing documents. It’s fun times. I think for this weekend, I have plans as this post will cover what my mind is fixated on for the moment, Golang and TUIs, and a pain that is daily buzzing me, cleaning log files to get the actual data. LLMs are good at it, but take a bit of time for such trivial things.

[]