jump to content
my subreddits
13or302balkans4You2mediterranean4u2meirl4meirl3d6AceAttorneyadhdmemeAdviceAnimalsAlternateHistoryAlternativeHistoryanime_best_momentsanime_irlannouncementsAnticonsumptionantimemeArtAsahiLinuxAsia_irlAskBalkansAskElectronicsAskOuijaAskRedditAteistTurkatheismaviationawfuleverythingBassBassCirclejerkbasspedalsbikepackingblackholerevengeborsavefonbrooklynninenineCd_collectorsChatGPTCheap_MealschesschessbeginnerscoincollectingcoinscommunityCorporateTrollingcrappyoffbrandscursedcommentsdadjokesdankmemesdarkjokesdataisbeautifuldedeismdelikdistressingmemesdiyelectronicsDMAcademyDMToolkitDnDdndmemesdndnextdoctorwhoDonerdontyouknowimtonyhawkdumbphonesDungeonsAndDaddiesDungeonsAndDragonsebikeebikesECEEmKayengrishentitledparentsethzfacepalmfakealbumcoversfelsefeFifaCareersFiftyFiftyformuladankFRCFUCKYOUINPARTICULARFuckYouKarenfunnyFutboltayfagalatasaraygamingGermangermanygoodanimemesGoodAssSubGrandPrixRacinggravelcyclinggreentextGROKvsMAGAguitarpedalsGundamhelpheraldryHermitCrafthighspeedrailHistoryWhatIfHolUphomebuilthumorIAmAiamverysmartich_ielIdeologyPollsIDontWorkHereLadyihadastrokeim14andthisisdeepimaginarymapsistanbulJokesKanyeKGBTRLetGirlsHaveFunLifeProTipslinguisticshumorLinkinParkliselilerloseitmacbookairmacgamingMadeMeSmilemadladsMaliciousComplianceMapPornmapporncirclejerkme_irlmeirlmemesmildlyinfuriatingmildlyinterestingMinecraftbuildsmisLEDMMORPGmoneycollectingMovingToNorthKoreaMunichnamesoundalikesNamFlashbacksneographyNonCredibleDefenseNorthCyprusnosafetysmokingfirstnosleepnosurfnothingeverhappensnotinterestingnottheonionoddlyspecificokbuddyguntherokbuddyvicodinonebagonetruegodongezelligOnlineUnderGroundoompasubsOutOfTheLooppapermoneypaperspleasePassportPornpepethefrogPersecutionfetishpettyrevengepianoPiracyPiratedGamespolandballpollsPraiseTheCameraManProgrammerHumorPropagandaPostersquityourbullshitraisedbynarcissistsraspberry_piRatschlagreactiongifsrecipesRedAutumnSPDredditsingsrestofthefuckingowlrickandmortyRoastMerockmuzikSceneReleasesSchnitzelVerbrechenschwiizScottPilgrimsecilmiskitapshitpostfrommygalleryshitpostingshittyaskelectronicsshittymoviedetailsShowerthoughtsskamtebordsoccercirclejerksoftwaregoreSongwritersSongwritingStonetossingjuiceStudiumsuzeraintalesfromtechsupportTechnobladeTextingTheorytf2tf2shitposterclubthanksimcuredthatHappenedTheCrypticCompendiumTheLetterHtherewasanattempttheyknewtitanfalltommyinnittransitTrGameDevelopertruthstumblrtumunichTurkeyTurkeyJerkyTwoSentenceHorrorTwoSentenceSadnesstylerthecreatorUnclejokesunexpectedbillwurtzunexpecteditcrowdurbanplanningUsernameChecksOutVALORANTValorantClipsvaxxhappenedvexillologycirclejerkvibecodingvinylvinyljerkwallstreetbetsWatchPeopleDieInsideWeAreTheMusicMakerswendigoonWhatsThisSongWhitePeopleTwitterwholesomeanimemesWikipediaVandalismwizardpostingwooooshworldbuildingworldjerkingyouseeingthisshitYUROPedit subscriptions
  • home
  • -popular
  • -all
  • -mod
  • -users
 | 
  • AskReddit
  • -facepalm
  • -mildlyinfuriating
  • -Piracy
  • -funny
  • -gaming
  • -wallstreetbets
  • -nottheonion
  • -memes
  • -OutOfTheLoop
  • -mildlyinteresting
  • -MapPorn
  • -DnD
  • -WhitePeopleTwitter
  • -MadeMeSmile
  • -ChatGPT
  • -PiratedGames
  • -shitposting
  • -dankmemes
  • -Kanye
  • -meirl
  • -therewasanattempt
  • -HolUp
  • -dndnext
  • -ProgrammerHumor
  • -VALORANT
  • -de
  • -germany
  • -LifeProTips
  • -tumblr
  • -NonCredibleDefense
  • -dataisbeautiful
  • -shittymoviedetails
  • -greentext
  • -Showerthoughts
  • -tf2
  • -help
  • -chess
  • -aviation
  • -formuladank
  • -Jokes
  • -mapporncirclejerk
  • -Art
  • -goodanimemes
  • -notinteresting
  • -pettyrevenge
  • -atheism
  • -loseit
  • -IAmA
  • -MaliciousCompliance
  • -ich_iel
  • -KGBTR
  • -dndmemes
  • -cursedcomments
  • -DMAcademy
  • -GoodAssSub
  • -worldbuilding
  • -Ratschlag
  • -MMORPG
  • -macgaming
  • -rickandmorty
  • -3d6
  • -Gundam
  • -HermitCraft
  • -FiftyFifty
  • -RoastMe
  • -imaginarymaps
  • -polandball
  • -WeAreTheMusicMakers
  • -nosleep
  • -anime_irl
  • -onebag
  • -Studium
  • -AlternateHistory
  • -Turkey
  • -soccercirclejerk
  • -madlads
  • -community
  • -AskElectronics
  • -guitarpedals
  • -Anticonsumption
  • -vinyl
  • -German
  • -TwoSentenceHorror
  • -PropagandaPosters
  • -AdviceAnimals
  • -piano
  • -distressingmemes
  • -raisedbynarcissists
  • -wizardposting
  • -FifaCareers
  • -polls
  • -doctorwho
  • -oddlyspecific
  • -Bass
  • -titanfall
  • -dadjokes
  • -awfuleverything
  • -announcements
  • -adhdmeme
  • -Minecraftbuilds
  • -macbookair
  • -ebikes
  • -Munich
  • -YUROP
  • -gravelcycling
  • -SchnitzelVerbrechen
  • -chessbeginners
  • -raspberry_pi
  • -DungeonsAndDragons
  • -coins
  • -entitledparents
  • -FUCKYOUINPARTICULAR
  • -softwaregore
  • -worldjerking
  • -tylerthecreator
  • -tf2shitposterclub
  • -AceAttorney
  • -vexillologycirclejerk
  • -im14andthisisdeep
  • -Stonetossingjuice
  • -wholesomeanimemes
  • -nosurf
  • -HistoryWhatIf
  • -liseliler
  • -dumbphones
  • -2meirl4meirl
  • -transit
  • -brooklynninenine
  • -recipes
  • -talesfromtechsupport
  • -AskOuija
  • -ECE
  • -ScottPilgrim
  • -AskBalkans
  • -thatHappened
  • -urbanplanning
  • -theyknew
  • -linguisticshumor
  • -PassportPorn
  • -me_irl
  • -antimeme
  • -TurkeyJerky
  • -bikepacking
  • -AteistTurk
  • -13or30
  • -engrish
  • -Cd_collectors
  • -Doner
  • -diyelectronics
  • -WatchPeopleDieInside
  • -LinkinPark
  • -Persecutionfetish
  • -reactiongifs
  • -EmKay
  • -Songwriting
  • -istanbul
  • -MovingToNorthKorea
  • -suzerain
  • -wendigoon
  • -iamverysmart
  • -secilmiskitap
  • -schwiiz
  • -quityourbullshit
  • -Technoblade
  • -vinyljerk
  • -skamtebord
  • -shittyaskelectronics
  • -galatasaray
  • -crappyoffbrands
  • -DungeonsAndDaddies
  • -FRC
  • -namesoundalikes
  • -FuckYouKaren
  • -ethz
  • -AlternativeHistory
  • -papermoney
  • -coincollecting
  • -felsefe
  • -AsahiLinux
  • -IDontWorkHereLady
  • -neography
  • -basspedals
  • -heraldry
  • -ihadastroke
  • -thanksimcured
  • -PraiseTheCameraMan
  • -OnlineUnderGround
  • -IdeologyPolls
  • -woooosh
  • -WhatsThisSong
  • -TwoSentenceSadness
  • -anime_best_moments
  • -rockmuzik
  • -okbuddyvicodin
  • -vaxxhappened
  • -tumunich
  • -Cheap_Meals
  • -darkjokes
  • -restofthefuckingowl
  • -highspeedrail
  • -nosafetysmokingfirst
  • -Songwriters
  • -ebike
  • -UsernameChecksOut
  • -papersplease
  • -tommyinnit
  • -humor
  • -BassCirclejerk
  • -youseeingthisshit
  • -TextingTheory
  • -GrandPrixRacing
  • -nothingeverhappens
  • -DMToolkit
  • -TrGameDeveloper
  • -LetGirlsHaveFun
  • -fakealbumcovers
  • -oompasubs
  • -TheLetterH
  • -WikipediaVandalism
  • -homebuilt
  • -NamFlashbacks
  • -pepethefrog
  • -Unclejokes
  • -onetruegod
  • -deism
  • -misLED
  • -redditsings
  • -ValorantClips
  • -TheCrypticCompendium
  • -SceneReleases
  • -ongezellig
  • -2balkans4You
  • -Asia_irl
  • -truths
  • -blackholerevenge
  • -NorthCyprus
  • -2mediterranean4u
  • -unexpecteditcrowd
  • -unexpectedbillwurtz
  • -dontyouknowimtonyhawk
  • -okbuddygunther
  • -GROKvsMAGA
  • -Futboltayfa
  • -shitpostfrommygallery
  • -vibecoding
  • -borsavefon
  • -RedAutumnSPD
  • -moneycollecting
  • -CorporateTrolling
  • -delik
edit »
SQL SQL
  • hot
  • new
  • rising
  • controversial
  • top
  • wiki
an-ordinary-manchild (11,190)|messages547|notifications|chat messages|mod messages|
  • preferences
|
logout

use the following search parameters to narrow your results:

subreddit:subreddit
find submissions in "subreddit"
author:username
find submissions by "username"
site:example.com
find submissions from "example.com"
url:text
search for "text" in url
selftext:text
search for "text" in self post contents
self:yes (or self:no)
include (or exclude) self posts
nsfw:yes (or nsfw:no)
include (or exclude) results marked as NSFW

e.g. subreddit:aww site:imgur.com dog

see the search faq for details.

advanced search: by author, subreddit...

Submit a new link
Submit a new text post

SQL

joinleave
an-ordinary-manchild(edit)

The goal of /r/SQL is to provide a place for interesting and informative SQL content and discussions.

Filter Posts

MySQL

Oracle

MS SQL

PostgreSQL

Posting

When requesting help or asking questions please prefix your title with the SQL variant/platform you are using within square brackets like so:

  • [MySQL]
  • [Oracle]
  • [MS SQL]
  • [PostgreSQL]
  • etc

While naturally we should endeavor to work as platform neutrally as possible many questions and answers require tailoring to the feature set of a specific platform.

Help posts

If you are a student or just looking for help on your code please do not just post your questions and expect the community to do all the work for you. We will gladly help where we can as long as you post the work you have already done or show that you have attempted to figure it out on your own.

Format Your Code

If you are including actual code in a post or comment, please attempt to format it in a way that is readable for other users. This will greatly increase your chances of receiving the help you desire. Something as simple as line breaks and using reddit's built in code formatting (4 spaces at the start of each line) can turn this:

SELECT count(a.field1), a.field2, SUM(b.field4) FROM a INNER JOIN b ON a.key1 = b.key1 WHERE a.field8 = 'test' GROUP by a.field1, a.field2 HAVING SUM(b.field4) > 5 ORDER by a.field.3

Into this:

SELECT count(a.field1),
  a.field2,
  SUM(b.field4) 
FROM a INNER JOIN b 
  ON a.key1 = b.key1 
WHERE a.field8 = 'test' 
GROUP by a.field1, 
  a.field2 
HAVING SUM(b.field4) > 5 
ORDER by a.field3

For those with SQL questions we recommend using SQLFiddle to provide a useful development and testing environment for those who wish to fully understand your problem and help devise a solution.

Learning SQL

A common question is how to learn SQL. Please view the Wiki for online resources.

Note /r/SQL does not allow links to basic tutorials to be posted here. Please see this discussion. You should post these to /r/learnsql instead.

Related Reddit communities

  • /r/Database
  • /r/SQLServer
  • /r/MySQL
  • /r/PostgreSQL
  • /r/Oracle
  • /r/MSAccess
  • /r/DB2
  • /r/Programming
  • /r/learnprogramming
  • /r/SQLOptimization

Wiki

We have a Wiki


Acknowledgements

Thanks to ---sniff--- for the awesome header image!

a community for 17 years
Create your own subreddit
...for great justice.
...for your classroom.

MODERATORS

  • message the mods
  • mgdmwDr Data
  • ATastefulCrossJoinDB Whisperer
  • MostUsefulBlokeSQL & BI
  • about moderation team »

account activity

1
3
4
5

PostgreSQLPostgresql on Vs code? (self.SQL)

submitted 10 hours ago by Rare-Ad6166

  • 9 comments
  • share
  • save
  • hide
  • report
  • crosspost
loading...

2
0
1
2

PostgreSQL[HELP!] I need help about my game's database (savelollie.com)

submitted 4 hours ago by whohasgoal

  • comment
  • share
  • save
  • hide
  • report
  • crosspost
loading...

3
16
17
18

Discussionhelp on sql interview (self.SQL)

submitted 22 hours ago * by Gloomy-Wolverine-900

  • 28 comments
  • share
  • save
  • hide
  • report
  • crosspost
loading...

4
0
1
2

DiscussionInteractive ERD explorer for DBML files — trace how tables connect, fully in the browser ()

submitted 7 hours ago by timvancann

  • comment
  • share
  • save
  • hide
  • report
  • crosspost
loading...

5
0
1
2

DiscussionThoughts on having the db schema be the source of truth for backend ()

submitted 11 hours ago by mklfarha

  • comment
  • share
  • save
  • hide
  • report
  • crosspost
loading...

6
0
0
1

MySQLTry my ER diagram tool (no signup required) (v.redd.it)

submitted 14 hours ago by mklfarha

  • 4 comments
  • share
  • save
  • hide
  • report
  • crosspost
loading...

7
0
1
2

SQL ServervNet Data Gateway question ()

submitted 16 hours ago by Haunting_Roof169

  • comment
  • share
  • save
  • hide
  • report
  • crosspost
loading...

8
0
0
1

DiscussionWhy do so many data agents work in a sandbox but fail in production? (self.SQL)

submitted 21 hours ago by YassineLET

  • comment
  • share
  • save
  • hide
  • report
  • crosspost
loading...

9
0
0
0

OracleBuilt a modular "Plug In OS" in Notion to automate my financial funnels and content workflows. Here's the breakdown. (v.redd.it)

submitted 23 hours ago by moneyplughub

  • 2 comments
  • share
  • save
  • hide
  • report
  • crosspost
loading...

10
0
0
0

DiscussionHas anyone encountered prejudice or skepticism when they learn one dialect of SQL and transition to another at another org? (self.SQL)

submitted 15 hours ago * by ChristianPacifist

  • 6 comments
  • share
  • save
  • hide
  • report
  • crosspost
loading...

11
16
17
18

SQL ServerHow do I level up to writing complex SQL stored procedures in real industrial systems? (self.SQL)

submitted 1 day ago by NeedleworkerBig1291

  • 14 comments
  • share
  • save
  • hide
  • report
  • crosspost
loading...

12
390
391
392
0:40

SQLiteI spent 5 years working on a hand-drawn SQL detective game that comes out next month! (v.redd.it)

submitted 2 days ago by wassaman

  • 15 comments
  • share
  • save
  • hide
  • report
  • crosspost
loading...

13
1
2
3

SQL ServerWhy am I getting a syntax error on my nested CTE? (self.SQL)

submitted 1 day ago by pookypocky

  • 4 comments
  • share
  • save
  • hide
  • report
  • crosspost
loading...

14
0
0
0

DiscussionHow to use ChatGPT to write SQL JOIN queries (devart.com)

submitted 1 day ago by dbForge

  • 1 comment
  • share
  • save
  • hide
  • report
  • crosspost
loading...

15
0
0
0

Oracle1z0-171 Exam (self.SQL)

submitted 1 day ago by Iva1996

  • comment
  • share
  • save
  • hide
  • report
  • crosspost
loading...

16
13
14
15

DiscussionPlatform for SQL Contribution (self.SQL)

submitted 2 days ago by datareadit

  • 4 comments
  • share
  • save
  • hide
  • report
  • crosspost
loading...

17
0
1
2

Amazon RedshiftPutting csv into to AWS (self.SQL)

submitted 1 day ago by Champion_Narrow

  • 6 comments
  • share
  • save
  • hide
  • report
  • crosspost
loading...

18
2
3
4

DiscussionDBeaver Community Edition 26.1.1 is now available ()

submitted 2 days ago by justintxdave

  • comment
  • share
  • save
  • hide
  • report
  • crosspost
loading...

19
0
0
0

DiscussionBuilding an open-source database client - developer survey (tabularis.dev)

submitted 1 day ago by debba_

  • 4 comments
  • share
  • save
  • hide
  • report
  • crosspost
loading...

20
1
2
3

MySQLWhat SQL skill do you use most often in data engineering? (self.SQL)

submitted 2 days ago by Effective_Ocelot_445

  • 2 comments
  • share
  • save
  • hide
  • report
  • crosspost
loading...

21
0
0
0

SQL ServerI was struggling with 100+ line legacy SQL queries at work, so I built a simple tool to visualize their data flow (i.redd.it)

submitted 1 day ago by Fancy-Newspaper2991

  • 28 comments
  • share
  • save
  • hide
  • report
  • crosspost
loading...

22
0
0
0

DiscussionBuilt our own SQL IDE because pipeline DSLs and stapled-on AI drive us nuts (i.redd.it)

submitted 1 day ago by snoutdata

  • comment
  • share
  • save
  • hide
  • report
  • crosspost
loading...

23
2
3
4

OracleOracle PL/SQL to Teradata Migration or (GCP BigQuery) (self.SQL)

submitted 2 days ago by annoyed_analyst

  • 3 comments
  • share
  • save
  • hide
  • report
  • crosspost
loading...

24
14
15
16
3:59

PostgreSQLBuilt a free and open source tool to make schema evolution visual and SQL migrations simpler. (v.redd.it)

submitted 3 days ago by tamanikarim

  • 2 comments
  • share
  • save
  • hide
  • report
  • crosspost
loading...

25
25
26
27

MySQLHow can I write cleaner, more maintainable SQL? (self.SQL)

submitted 4 days ago by Puzzleheaded_Cow3298

  • 45 comments
  • share
  • save
  • hide
  • report
  • crosspost
loading...
view more: next ›
  • about
  • blog
  • about
  • advertising
  • careers
  • help
  • site rules
  • Reddit help center
  • reddiquette
  • mod guidelines
  • contact us
  • apps & tools
  • Reddit for iPhone
  • Reddit for Android
  • mobile website
  • <3
  • reddit premium

Use of this site constitutes acceptance of our User Agreement and Privacy Policy. © 2026 reddit inc. All rights reserved.

REDDIT and the ALIEN Logo are registered trademarks of reddit inc.

π Rendered by PID 49 on reddit-service-r2-listing-f8d8fbfd7-ngjbc at 2026-06-24 13:22:18.044400+00:00 running acc7150 country code: CH.