r/SQL
•
u/Practical-City3301
•
Dec 10 '24
Discussion Left Join vs Right Join
The discrimination right join has to face.
r/SQL
•
u/Practical-City3301
•
Dec 10 '24
The discrimination right join has to face.
r/SQL
•
u/NickSinghTechCareers
•
Dec 12 '24
r/SQL • u/Flying_Saucer_Attack • Feb 11 '25
r/SQL
•
u/Brave-Growth-6823
•
Dec 12 '24
I mean why that question ðŸ˜ðŸ˜ðŸ˜
r/SQL • u/nikkiinit • Jul 03 '25
I don't know who needs to hear this, but:
It's not your logic.
It's not your code.
It's the missing index.
After 4 hours of watching my query chew through 20 million rows, I went back to my note from school and I totally forgot about EXPLAIN ANALYZE. Which is used to diagnose and optimize slow queries.
The query was slow because, it's doing a sequential scan on a table the size of the Pacific Ocean.
I add an index on the join column. Rerun.
Boom. 0.002 seconds.
So, if your query is slow, use EXPLAIN ANALYZE to understand how your query is executed and how long each step takes.
EXAMPLE:
EXPLAIN ANALYZE
SELECT * FROM tableName WHERE condition;
Anyway, I now accept offerings in the form of pizza, energy drinks, and additional query optimization problems. AMA.
r/SQL • u/tits_mcgee_92 • May 17 '25
I am teaching an "Intro to Data Analysis" course that focuses heavy on SQL and database structure. Most of my students do a wonderful job, but (like most semesters), I have a handful of students who obviously use AI. I just wanted to share some of my funniest highlights.
Student forgets to delete the obvious AI ending prompt that says "Would you like to know more about inserting data into a table?"
I was given an INNER LEFT INNER JOIN
Student has the most atrocious grammar when using our discussion board. Then when a paper is submitted they suddenly have perfect grammar, sentence structure, and profound thoughts.
I have papers turned in with random words bolded that AI often will do.
One question was asked to return the max(profit) within a table. I was given an AI prompt that gave me two random strings, none of which were on the table.
Student said he used Chat GPT to help him complete the assignment. I asked him "You know that during an interview process you can't always use chat gpt right?" He said "You can use an AI bot now to do an interview for you."
I used to worry about job security, but now... less so.
EDIT: To the AI defenders joining the thread - welcome! It's obvious that you have no idea how a LLM works, or how it's used in the workforce. I think AI is a great learning tool. I allow my students to use it, but not to do the paper for them (and give me the incorrect answers as a result).
My students aren't using it to learn, and no, it's not the same as a calculator (what a dumb argument).
r/SQL • u/supermutt_1 • Feb 18 '25
Link to the original post: https://www.reddit.com/r/SQL/s/WL84lNoem6
r/SQL
•
u/NickSinghTechCareers
•
Jun 18 '24
r/SQL • u/[deleted] • Feb 21 '25
I'm currently a lead analyst of business intelligence and analytics. Basically, a BI engineer. Half data analytics, half data engineering. And unfortunately I was laid off yesterday in a major hub, Charlotte North Carolina. I have been job searching for several weeks because I know that this restructure has been coming and there's just nothing... Literally nothing for me anywhere. And when I do see a business intelligence job posted, it already has a lot of other people that have applied for it and thrown their hat into the ring....
We are on the verge of seeing BI, analytics, data engineering roles either be offshored into other countries for cheaper labor, or outright eliminated by artificial intelligence augmented with a data analytics person behind the scenes...
I will be honest with you. I have no idea what to do anymore. I feel like I am being forced out of the market entirely, and despite being repeatedly told for the last 5 years of my career how capable I am and successful I am at developing BI solutions and analytics, now it's like it doesn't matter. How good I am or how capable I am, what I've achieved. No employer really cares because they have several thousand other people who are in the exact same boat.... Which leaves me without any career prospects and I have simply no idea or understanding what I can even do next. Do I go for a trade? HVAC, plumbing? Am I even capable of that? Do I go for nursing? That would cost me at least 50k in student loans to go back to school for. Housing is also absurdly expensive, so I don't even think I would be able to go back to school for anything without working, it just doesn't seem possible....
Curious to know your thoughts and if you have any insight.
r/SQL
•
u/lostinmyfrontallobe
•
Mar 07 '25
UPDATE - I GOT THE JOB!!!!!!!!!!!!!!!
I've been learning SQL for a while, and I finally decided to start applying for jobs!
I wanted to share a few pointers for anyone out there on the same journey.
Once you can confidently apply complex joins and subqueries, you're basically ready. However, learning CTEs, Window Functions, and Regex will give you an extra edge!
Take Notes! I can't stress this enough.
During my interview, I was asked a time-related question that required converting a string to a datetime format and filtering it. Since I’ve been diligently taking notes from my courses and books, I immediately remembered the function I needed.
Make sure to take notes and know where to find them when needed—it makes a huge difference! The interviewer even asked how I managed to write the query so fast because, even for him, it would take a while. (He was awesome, by the way!) I told him I keep a collection of notes with references to useful queries and subqueries, which helps me solve problems quickly.
Next interview is coming up to seal the deal! Just wanted to share my excitement and hopefully motivate you all to keep pushing forward. Wishing you all the best in landing your dream jobs!
edit: Thank you for the comments and feedback! I didn't expect to get this much encouragement, and has been a bit of a lonely road, no longer being the case.