this post was submitted on 27 May 2025
656 points (99.4% liked)

Programmer Humor

23530 readers
1714 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] Solemarc@lemmy.world 1 points 1 day ago

I had a fun one this week! I needed to make an SQL query that would aggregate rows by invoice and date, but only aggregate 5 then overflow to a new row. I also needed to access the individual row data because the invoice items weren't summed, they were displayed on separate columns!

I ask my senior if there's an easy way to do this, he comes back with "chatgpt says you can assign row numbers then get individual row data with % row number"

I go to Gemini and ask "how to aggregate rows by 5 and get individual row data out?" It says "you can't" (since when has Ai's been able to say you can't do X) So I ask it about the modulo operator and it gives me an example that doesn't really work. After screwing around for a while I give up and decide I'll just run this query 3 times. 1 for rows 1-5 then for 6-10 and one more for 11-15 that's so many rows surely no one will break this.