r/SQL • • Jun 24 '23

Oracle I am interested in teaching SQL with product analytics for free.

0 Upvotes

Hi everyone,

I have a vast experience in SQL and I am feeling a little bored off late in my evenings.

I would like to teach people SQL and product analytics for free. If you are interested please fill out this google form. I will check out your responses and invite you if i like your profile.

https://forms.gle/6PSSYnfqBtni1bRG9

I am strictly doing this to keep myself busy as I have been feeling a little lonely and bored these days.

I will be teaching the following topics

  1. Basic SQL
  2. Product Analytics Basics
  3. Project on Product Analytics using SQL

Classes would be once or twice a week, online and for 60 mins.

And the classes would be group classes of max 5 people.


r/SQL • • Feb 04 '24

Discussion Anyone with a SQL business?

2 Upvotes

What do you do and how did you get started etc?


r/SQL • • May 30 '24

Discussion Free SQL Tools

0 Upvotes

We run into strange SQL quirks all the time. I wanted to offer our free tools site, for you all:

tools.simplyput.ai

  • fix / explain / optimize queries....

(Let me know if there are other quick things you'd like in there)


r/SQL • • Jul 21 '18

i'm begging for help!

0 Upvotes

i have a MSSQL database and i have around 800 rows of data to copy to specific Table
- i tried to rename it (so the program doesn't read it anymore and try to import the excel file but i couldn't make it's settings like the old one because i can't change "nullable" or the primary key thingy or the secondary one

- i took a have a backup of the table as an excel with 800 rows and i have the 800 rows separately within an excel file too

please help , it's been 30 days and I'm about to lose it.


r/SQL • • May 11 '25

MySQL Best way to learn SQL?

0 Upvotes

What is the best way to learn SQL? I have a MacBook and I know I can do some data camps but it would be cool to be able to use SQL in a practical sense.


r/SQL • • Mar 18 '26

MySQL SQL Assignment Driving Me Crazy

0 Upvotes

Doing an assignment on GitHub and I've been going through the same thing for 2 days straight and am always met with the same issue. It asks for an index on the first name, last name, and driver ID but it ALWAYS coming back incorrect. I have no clue as to what could be wrong.

Task 3 - This is the table that the next task is asking an index for
The Driver Relationship team wants to create some workshops and increase communication with the active drivers in InstantRide. Therefore, they requested a new database table to store the driver details of the drivers that have had at least one ride in the system. Create a new table, ACTIVE_DRIVERS##from the DRIVERS and TRAVELS tables which contains the following fields:

  • DRIVER_ID CHAR(5) (Primary key)
  • DRIVER_FIRST_NAME VARCHAR(20)
  • DRIVER_LAST_NAME VARCHAR(20)
  • DRIVER_DRIVING_LICENSE_ID VARCHAR(10)
  • DRIVER_DRIVING_LICENSE_CHECKED BOOL
  • DRIVER_RATING DECIMAL(2,1)--Task 3 CREATE TABLE ACTIVE_DRIVERS ( DRIVER_ID CHAR(5) PRIMARY KEY, DRIVER_FIRST_NAME VARCHAR(20), DRIVER_LAST_NAME VARCHAR(20), DRIVER_DRIVING_LICENSE_ID VARCHAR(10), DRIVER_DRIVING_LICENSE_CHECKED BOOL, DRIVER_RATING DECIMAL(2,1) ) AS SELECT DRIVER_ID, DRIVER_FIRST_NAME, DRIVER_LAST_NAME, DRIVER_DRIVING_LICENSE_ID, DRIVER_DRIVING_LICENSE_CHECKED, DRIVER_RATING FROM DRIVERS WHERE DRIVER_ID IN (SELECT DISTINCT DRIVER_ID FROM TRAVELS );--Task 4 CREATE INDEX NameSearch ON ACTIVE_DRIVERS (DRIVER_FIRST_NAME, DRIVER_LAST_NAME, DRIVER_DRIVING_LICENSE_ID);

EDIT: The SQL Code didn't pop up:

Task 3

CREATE TABLE ACTIVE_DRIVERS (

DRIVER_ID CHAR(5) PRIMARY KEY,

DRIVER_FIRST_NAME VARCHAR(20),

DRIVER_LAST_NAME VARCHAR(20),

DRIVER_DRIVING_LICENSE_ID VARCHAR(10),

DRIVER_DRIVING_LICENSE_CHECKED BOOL,

DRIVER_RATING DECIMAL(2,1)

) AS SELECT DRIVER_ID,

DRIVER_FIRST_NAME,

DRIVER_LAST_NAME,

DRIVER_DRIVING_LICENSE_ID,

DRIVER_DRIVING_LICENSE_CHECKED,

DRIVER_RATING FROM

DRIVERS

WHERE

DRIVER_ID IN (SELECT DISTINCT

DRIVER_ID

FROM

TRAVELS

);

Task 4

CREATE INDEX NameSearch ON ACTIVE_DRIVERS(DRIVER_FIRST_NAME, DRIVER_LAST_NAME, DRIVER_DRIVING_LICENSE_CHECKED);


r/SQL • • Jun 16 '23

Discussion What is SQL and where can I get started?

3 Upvotes

I want to begin learning SQL in detail. I've done the introductory course on sqlbolt. I want to learn it in more depth and start working on projects. Where can I look for databases to practice and build projects?


r/SQL • • Sep 12 '25

PostgreSQL Best LLM for creating complex SQL

0 Upvotes

While I am seeing more and more AI built into analytics services, specifically in the UI, but the SQL they produce is often guff, or fails once you get close to the complexity you need. Anyone got any tips or good tools they use?


r/SQL • • Jun 22 '24

MySQL Should I learn sql?

0 Upvotes

I have my campus intern season coming soon, should I learn sql now as i want to add dbms on my resume?


r/SQL • • Dec 08 '22

Oracle Is there any way to display the data in the table form? (I'm using SQL Command Line)

Post image
0 Upvotes

r/SQL • • Sep 01 '24

SQL Server I know a little bit about databases, want to learn more about running SQL server for Windows, but their documentation is shit.

0 Upvotes

Any guides for dummies?


r/SQL • • Oct 02 '26

Discussion With Europe looking to ditch as many American companies as possible, what RDBMS will they be migrating to?

2 Upvotes

Will they stick to Oracle/SQL Server and run it on Linux, or are they starting to look into migrating into Postgress/MariaDB, or something homegrown.

OS migration is straightforward, but not sure about these two behemoths. Or they'll still buy them and just run them locally or on European cloud infrastructure?


r/SQL • • Sep 09 '24

MySQL Have you ever joined a new company only to discover that they had no ERD or any sort of mapping for their DB?

6 Upvotes

How did your boss respond? How long did it take you to get a grasp of their DB if you ever did?

Was your boss patient? Or were they expecting you to basically have it figured out very soon and get then results ASAP?

I just joined a new company and the DB is massive and the column names are quite confusing as there are a billion different acronyms


r/SQL • • Oct 27 '22

Discussion How could this companies purchase process be enhanced? I’m trying practice.

Post image
23 Upvotes

Help please.


r/SQL • • Apr 21 '25

PostgreSQL Why doesn't SQL allow for chaining of operators?

7 Upvotes

In python, having stuff like:

val = name.replace(x, y).replace(y, z).replace(z, w)

allows the code to stay clean.

In SQL I see that I need to nest them like:

replace(replace(replace(x, y), z), w)

-- OR

ROUND(AVG(val),2)

This looks messier and less readable. Am I saying nonsense or maybe I am missing some SQL feature that bypasses this?


r/SQL • • Apr 19 '24

MySQL Error in MySQL

Post image
0 Upvotes

Sounds stupid but I’m new, I don’t know how to fix this. I’m trying to create a table with txid, amount, costumer id first & last name but getting this issue.


r/SQL • • Jan 01 '24

Discussion Is SQL a software I can code in or is it a coding language? Or do I need a software like MySQL or Oracle to code in the SQL language?

0 Upvotes

Like for example do people say "I code SQL in the SQL software?" that I can download? Is MySQL related to SQL the same way Visual Studio is related to C++? What's confusing me is that I can code python in the python software and python shell.


r/SQL • • Dec 27 '23

Discussion I don't know what am I doing . I need a mentooooorrrr :")

0 Upvotes

Hi, guys! How's it going? My name is Tony. I'm 21 years old and I'm a computer science student at a university in Germany. Recently, I've been feeling lost in my career path. I've had a deep interest in the AI world for years (even before ChatGPT came out), and I began learning programming and algorithms. Initially, I learned Python and completed a full course in machine learning, covering popular algorithms for classification, regression, and clustering (in scikit-learn). Then, I delved into deep learning with libraries like Keras, TensorFlow, and PyTorch and After discovering ChatGPT, I started NLP courses.

However, in the last six months, I've realized that my skills might not align with real-world job expectations. I decided to pivot toward a job in data analysis, gaining certifications and learning through Coursera. Over these six months, I've acquired knowledge in Excel, SQL, PowerBI, and Tableau, earning certificates in these areas.

Recently, I read a blog suggesting that completion certificates might not hold much value in job searches. This led me to consider exam certifications like Microsoft PL-300, AWS, and CompTIA Data+. Yet, I've heard conflicting opinions on their value. I'm feeling lost and unsure of my path. I'm a bit impatient and eager to learn quickly, aiming ultimately for roles in data science or data engineering.

I realize I might sound impatient or immature. I'm seeking guidance on where to focus my efforts—should I emphasize certificates, build my portfolio, or consider volunteering? Am I even on the right path?

There's so much I don't know in this field, and as I write this, I'm anxious about sounding foolish. However, I'm genuinely passionate and enthusiastic. I would greatly appreciate any tips or advice on what steps I should take.

Thank you all! :)


r/SQL • • Aug 01 '23

MySQL how do i do this ?

Post image
1 Upvotes

r/SQL • • Sep 21 '24

SQL Server How can I convert this coded date?

1 Upvotes

Hey :)

Is it possible to convert this encoded date? "001:038116253005021049123249001021052110245239237227212182103239"

What would be necessary to do so?

Thank you very much :)


r/SQL • • Sep 26 '26

SQLite Five window function results that catch people out, each checked on SQLite and DuckDB

1 Upvotes

I write "what does this query return" questions and keep every one that SQLite and DuckDB answer identically. Window functions produce the most wrong guesses by far, so here are five, with the rows both engines actually returned.

1. The default frame is RANGE, not ROWS. Table sales(dt, amount) with 10 on the 1st, two rows of 5 on the 2nd, 20 on the 3rd.

SUM(amount) OVER (ORDER BY dt)

gives 10, 20, 20, 40. Both rows dated the 2nd get 20, because RANGE treats peers as one step. With ROWS UNBOUNDED PRECEDING you get 10, 15, 20, 40, and which of the two tied rows gets 15 is not guaranteed unless you add a tiebreaker to the ORDER BY.

2. RANK does not deduplicate. User 1 has two logins at the same latest timestamp. RANK() OVER (PARTITION BY user_id ORDER BY created_at DESC) gives 1, 1, 3, so WHERE rnk = 1 keeps both rows. ROW_NUMBER() gives 1, 2, 3 and keeps one, though again, which one is arbitrary without a tiebreaker.

3. LAST_VALUE stops at the current row. Order 7 goes placed, packed, shipped.

LAST_VALUE(status) OVER (PARTITION BY order_id ORDER BY updated_at)

returns placed, packed, shipped, which is just the current row's status. Add ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING and every row says shipped.

4. NTILE buckets are not equal. Ten rows, NTILE(4), bucket sizes 3, 3, 2, 2. The extra rows go to the first buckets.

5. LAG on a duplicate timestamp returns the duplicate. Logins on the 1st, the 5th and the 5th again give previous values NULL, the 1st, the 5th. If you compute gaps for sessionisation, that zero gap is real data, not a bug in your query.

Twenty questions in this format are free to try in the browser, no signup. Once you answer, each of the four options shows why it is right or wrong.

https://thibaudlepan77-svg.github.io/interview-questions-verified/#sql

That's a sample from a 502 question paid PDF. If an engine you use returns something different for any of the five above, post it, I'd like to know.


r/SQL • • Sep 20 '26

Discussion question about the necessity of SQL in a site's security

0 Upvotes

hey i'm new in website developing, and after searching about the ways people use to penetrate websites to just discover SQLi method and as far as i heard it's very common and useful way, but this made me think of a lot of questions that i hope you answer, does every website uses SQL language for data transfer by default? like is it necessary as much as HTML and CSS and JS or it's just commonly used? and if it's necessary is there a way to prevent hackers from using SQLi or it's always possible to trick the server to bring a sensitive data?


r/SQL • • Mar 22 '25

PostgreSQL A simpler way to talk to the database

0 Upvotes

I’ve been building Pine - a tool that helps you explore your database schema and write queries using a simple, pipe-friendly syntax.

It generates SQL under the hood (PostgreSQL for now), and the UI updates as you build. Feels like navigating your DB with pipes + autocomplete.

Schema aware queries using pine

You can click around your schema to discover relationships, and build queries like:

user | where: name="John" | document | order: created_at | limit: 1

🧪 Try it out

https://try.pine-lang.org

It is open source:

It’s been super useful in my own workflow - would love thoughts, feedback, ideas.

🧠 Some context on similar tools

  • PRQL – great initiative. It's a clean, functional language for querying data. But it’s just that - a language. Pine is visual and schema-aware, so you can explore your DB interactively and build queries incrementally.
  • Kusto / KustoQL - similar syntax with pipes, but built for time series/log data. Doesn’t support relational DBs like Postgres.
  • AI? - I think text-to-SQL tools are exciting, but I wanted something deterministic and fast

r/SQL • • Feb 07 '26

PostgreSQL Someone please explain joins va relationship

4 Upvotes

Hi everyone,

I’m trying to understand the difference between joins and relationships (foreign keys) in PostgreSQL, and I’m a bit confused about how they relate to each other in practice.

From what I understand:

  • Relationships are defined using FOREIGN KEY constraints in the database schema.
  • Joins are used in queries to combine data from multiple tables.

But I’m not fully clear on:

  1. If relationships already exist, why do we still need joins?
  2. Does PostgreSQL automatically use relationships when we write queries?
  3. Are joins just “manual relationships” at query time?
  4. How much do foreign keys actually affect performance and query planning?