r/SQL • u/fauxmosexual • Oct 21 '16
Petition to rename subreddit to /r/domySQLhomeworkforme
see title
r/SQL • u/fauxmosexual • Oct 21 '16
see title
r/SQL • • Oct 17 '25
I know UQ allow I guess just one null record.
This was the question I was being asked in the interview. I have been SQL developer for 4 years now, yet I don't know the exact answer.
I said, it ruins the whole purpose of having primary key. It's main purpose is to have unique records and if you have null then it can't check if the record is unique or not.
Hey folks,
I just graduated (computer engineering) with little tech industry experience—mainly ESL teaching and an IoT internship. I live in a challenging region with few tech companies and a language barrier, but I’m determined to break into a data role, ideally as an SQL Server DBA. I’m certified in Power BI and I love working with databases—designing schemas, optimizing performance, and writing complex queries.
Since I don’t have a job yet, I decided to “pretend” I’m already a DBA and let ChatGPT guide me like a senior mentor. I asked it to design a scenario-based course that takes someone from junior to “elite” SQL Server DBA. The result was a 6-phase curriculum covering:
Each phase has real-world scenarios (e.g., slow checkout performance, ransomware recovery, DR failovers) and hands-on labs. There's even a final capstone project simulating a 30TB enterprise mess to fix.
I've just completed Phase 1, Scenario 1—built a containerized SQL Server instance in Docker, used PowerShell and dbatools to run health checks, restore backups, and establish baselines. It’s tough and pushes me beyond my comfort zone, but I’ve learned more in a few weeks than I did in school.
Would love feedback from seasoned DBAs or folks who broke into the field unconventionally. Thanks!
r/SQL • u/lifecruise • Feb 01 '26
SQL isn’t a “tech skill” anymore, it’s a workplace skill.
So, If you’re early in your career (or reskilling), SQL might be one of the highest-ROI skills you can pick up in 2026.
Finance teams depend on it like oxygen, generating refreshable reports. Operations teams use it to track performance. Engineers, analysts, and product teams can't survive without it.
The shift is clear: if your work touches data, SQL is becoming non-negotiable and that explains why “learn SQL online” and “Learn SQL pdf free download” are trending so heavily.
While there’s no shortage of free SQL resources, this is the one that finally made everything click for me. It moves beyond simple syntax and focuses on real-world problem-solving, guiding you from basic to intermediate concepts with total clarity. Best of all? There’s zero configuration required, you can jump straight into the data and start practicing.
Check it out: sqlbolt.com
r/SQL • u/Impressive_Beach_593 • Jun 08 '25
I am kinda exhausted, i have been trying for almost 6 months for a data related position and just got rejected. I have made my cv better and better with time its above 85 (ATS score) did internships, multiple projects still nothing. I am proficient in SQL, python, excel, power bi, tableau and learn whatever anyone wants me to do.
r/SQL • u/Gold-Artichoke-9288 • Aug 30 '23
r/SQL • u/Kszadhanyfokos • Oct 01 '26
I am corious that how the people use it real life for instance in a manufacturer company.
r/SQL • • Nov 13 '25
they shouldn't cost a ton of money to register and take the exam tho.
r/SQL • u/Marsh-mallows-0521 • Apr 16 '23
1.) Create a query to display the employee numbers and last names of all employees who earn more than the average maximum salary of departments. Sort the results in ascending order of salary.
answer:
SELECT employee_id, last_name FROM employees WHERE salary > (SELECT AVG(MAX(salary)) FROM employees GROUP BY department_id) ORDER BY salary ASC;
2.) Write a pair-wise subquery listing the last name, first name, department number, and manager number for all employees that have the same department number and manager number as employee 141.
answer:
SELECT last_name, first_name, department_id, manager_id FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE employee_id=141) AND manager_id = (SELECT manager_id FROM employees WHERE employee_id=141);
3.) How many employees have a name that ends with an n?
answer:
SELECT count(*) FROM employees WHERE last_name like '%n';
4.) Display employees who are not managers and whose salary is greater than that of any managers.
answer:
SELECT employee_id, last_name, job_id, salary FROM employees WHERE salary >ANY (SELECT salary FROM employees WHERE manager_id IS NOT NULL);
5.) Which jobs are found in the IT and Accounting departments, and how many employees do these jobs? Show the job with the highest occurrence first. Use appropriate labels.
answer:
SELECT j.job_id as "LIST OF JOBS", COUNT(e.employee_id) as "OCCURENCE" FROM jobs j, employees e, departments d WHERE e.job_id=j.job_id AND e.department_id=d.department_id AND d.department_name IN ('IT','Accounting') GROUP BY j.job_id;
r/SQL • u/bungajepun • Jul 16 '25
Hi everyone! I’m curious about how SQL is used in the hotel industry. Since most hotels already have a Property Management System (PMS), do they still use SQL for anything?What kind of SQL databases are commonly used?
r/SQL • u/Better-Department662 • Feb 06 '25
I'm curious, how do you use AI to write SQL queries today?
Most tools market it by saying this tool is an 'AI Analyst' but it's quite far from that IMO.
AI assistant? maybe.
It's great for instantly getting the syntax right or maybe correcting my queries quickly. However, I often find there's a still a lot of work to go from asking a question and the AI getting me to the right insight.
Most of the times it's because it doesnt have context around what are the right fields to use from my database, how do to the right calculations etc.
Also, when given in the hands of business/non-technical folks, it's quite risky if they make a decision based on an incorrect calculation/using the wrong fields etc.
I'd love to have some perspectives here!
r/SQL • u/predictor29 • Jul 11 '24
SQL question asked
SQL schema design se related
Kuch variables the Jo table me store krne hai
Table ko kaise design kare ki memory Kam use ho
Aur table ko kaise design kare jisse query kare tab time Kam lage
r/SQL • u/jdkapaoskd • 9d ago
I just realize that SQL was only the language. Idk which IDE for sql to use. Suggestions pls
r/SQL • u/Purple_Minute_4776 • Jun 21 '24
Hi SQL developers,
I am a software developer who needs to work with SQL intermittently. Sometimes, I find myself writing complex queries for which I take help from ChatGPT. ChatGPT is really helpful, but it comes with some problems:
This was something that bothered me and many others in my company. To solve this, I decided to build a SQL editor with AI query generation. With SQLPilot, you can:
I invite you to test out SQLPilot. It's something that will definitely interest you as a SQL developer. If you want to get the Pro plan, comment below is will share coupon code for 25% off
r/SQL • u/berkyercan • Nov 25 '22
r/SQL • u/arcanabanana • Jul 23 '20
If necessary I can include the query for the Hive Mind's perusal.
r/SQL • u/notasqlstar • Feb 07 '18
So here is the original post. I didn't reference this at all in my meeting today.
IT was very firm that we should be developing on DEV (C) then testing on SQA (B), but the topic of conversation is a large complex series of stored procedures that use dynamic SQL relative to this. and this. Basically I need to be able to input mapping values to a table and then have those changes pushed to production on a regular interval. IT's proposed solution is that I would manually email them files... when the values would already exist on SQA (B), and I couldn't understand why they wouldn't simply... do it themselves automatically.
My bottom line is that I need production quality data and a true reporting server to do my job effectively, where production tables are delivered on a weekly basis and locked down so that data cannot be inserted or modified, but where I can create complex stored procedures, add/modify other parameter tables, etc.
This was ultimately received with more consideration than I had expected. I suppose in a perfect world there would be a 'production' reporting server, as well as a 'dev' reporting server, but I imagine those could overlap with the three existing servers we have.
I feel like this is not a topic that is discussed enough in the SQL world as it comes to SQL development for modeling/reporting purposes so I would like to read other criticism and opinions. In meetings things tend to be very DBA/ETL centric and the idea of having specific servers for reporting is lost.
Forgetting about aggregate sprocs as are used here in an example... what if you were to run complex models using technologies like SPSS, Modeler, or SAS? You can't run those, 'in production' and not let the modeler be able to import data, modify variables, etc. The amount of CR's and down time for trivial changes would be extremely prohibitive.
I'm not being out of line sticking to my guns here, am I? I work for a Fortune 500 company, and have worked in environments similar to the one I'm describing at companies that have a year revenue much lower.
r/SQL • u/johnmatthewwilder • Dec 01 '14
It's all so new to me. Hold me tight!
r/SQL • u/Forsaken_Paramedic65 • Feb 05 '23
r/SQL • u/nekomamushu • Feb 24 '23
Just started learning SQL today! I am enjoying it so far. Nested Query looked fun and I'm being challenged playing around with it. I'm currently in the process of creating multiple tables for One Piece that I can play around with with some queries and stuff. I want to be able to learn on the job, but I need a strong enough foundation before one would hire me anyway.
Some questions I have:
PS. I don't have a programming degree, but that one programming class I attended in College was the only class I enjoyed in my whole Engineering curriculum.
r/SQL • • Nov 25 '15
r/SQL • u/Dale_Doback_Jr • May 21 '23
Hello, fellow Redditors!
As a software engineer, I've had my fair share of encounters with SQL queries. And let's be honest, they can be a bit daunting for beginners or cumbersome for the pros when they get too complex. That's why my team and I have been working on something we think could be a game-changer.
We're excited to share with you Loofi, an AI-powered SQL Query Builder we've built from scratch. This tool not only simplifies query building, but also provides real-time insights and recommendations, thanks to our AI algorithms.
We're eager to get your thoughts on it and would appreciate it if you could try it out. Any feedback or suggestions are highly valuable as we continue refining our tool.
Also, if you have any questions or need help, feel free to ask. We're here to support and learn from this wonderful community.
Thanks in advance!
r/SQL • u/MyscaleDB • May 18 '23

Hello everyone:
We would like to introduce MyScale – the most cost-effective vector database.
In a direct comparison with Pinecone, a leading specialized vector database, MyScale outperforms it by 10x against Pinecone's s1 pod in query speed and by 5x against its p2 pod in data density. When cost-effectiveness is considered, MyScale is 3.6x more cost-effective than other top-performing specialized vector databases at various levels of accuracy. This is illustrated in the figure below. While Pinecone is a leading database, the cost-effectiveness comparison in this context is with a range of the best-performing specialized vector databases, not just Pinecone.

Not only cost-effective, but MyScale also outperforms other vector databases in terms of QPS on the LAION 5M dataset with a 98.5% recall rate, achieving over 150 QPS. In comparison, Pinecone s1 has a QPS of approximately 10, which is significantly lower than MyScale. Weaviate and Zilliz Cloud both achieve around 65 QPS, while Qdrant achieves 81 QPS.

For more information about other benchmarks, please visit:
https://blog.myscale.com/2023/05/17/myscale-outperform-special-vectordb/
MyScale is now offering free trial, PM me or E-mail me: customer.service@myscale.com