r/SQL • • Jan 22 '26 • Heartwarming 1

Discussion I think I might be addicted to learning SQL?

Hello, just wanted to say I'm a true beginner and I recently found the SQL climber website and now I'm really looking forward to my daily lessons. It's crazy because usually when I try to self-teach I get really bogged down and lazy, but something about using this site and slowly figuring things out makes me feel so satisfied.

I go through a constant roller coaster of "I'll never be able to understand this complicated mess in a million years" to "This is crystal clear now and just clicks" in a couple of hours. I started practicing until I get really frustrated, and oddly if I get too confused or angry I go to sleep and the next morning it all makes sense suddenly.

So now I'm using mimo for duolingo-like lessons, and just watching a bunch of YouTube channels about data analysis. I'm fully addicted and using it to improve my work tasks (I'm a GIS analyst). I now use dbeaver and sqlite to upload CSVs from our database to clean them up, do joins, etc.

Next I'm off to learning how to use github and doing full projects! Thank you to this community.

96 Upvotes

28 comments sorted by

View all comments

Show parent comment

3

u/waitthissucks Jan 22 '26

My biggest problem at work (being in city government and receiving applications filled out by citizens) is that I received filled out addresses that are spelled wrong, are formatted differently, and are are put into the wrong columns. It's such a mess and honestly we should have some sort of auto-detect addressing from input because idk how to clean that up without looking through each cell in excel. Maybe I can use sql to fix that.

1

u/GlockByte Jan 22 '26

I recommend Trigrams and Rapidfuzz:

Use trigrams in your database:
CREATE VIRTUAL TABLE address_lookup USING fts5(raw_address, tokenize='trigram');
Filling with your most clean reference data (I assume you have this)

Use RapidFuzz in a python script. Have your python call your messy table, one by one iterate through the mess to find matches above 97% final score. (don't go for anything under 95%)

It's important to weight it differently across the address - We know the street suffix isn't really that important when trying to find a match so it's weight is lower.

Example - Final Score - (houseMatch) * [(0.7 * streetNameScore) + (0.2 * suffixScore)]
Doing this makes houseMatch zero out the match if the address is a different number. You could have a second equation to pass through to handle typo street numbers if the typo street number doesn't exist, but the name and suffix does

You should make this a Human-in-the-loop architecture. You want it to give you messy_address, matched_address, is_confirmed. Basically have it do the automation - allowing you to check over them - then setting the is_confirmed bit to 1 when you agree with it. This removes the bulk without you finding out it needed tweaks and overwrote your data. HITL is a standard practice in fuzzy matching and making your cross-walks when you get into making a lakehouse.