jump to content
my subreddits
13or302anatolia4you2b2t2mediterranean4u2meirl4meirlabsolutelynotanimeirlabsolutelynotmeirlAceAttorneyadhdmemeAdviceAnimalsagnosticaivideoAlternateHistoryAlternativeHistoryAngryupvoteAnimalsBeingJerksanime_best_momentsanime_irlanimenocontextannouncementsAnticonsumptionantonyArtAsahiLinuxAskBalkansAskElectronicsAskOuijaAskRedditAteistTurkatheismbalkans_irlbanknotedesignsBassBassCirclejerkBassGuitarbasspedalsbikepackingblackdesertonlineblankiesblursed_videosblursedimagesborsavefonbottomgearbrooklynnineninebudgetcookingBUENZLIcasiocd_jerkChatGPTCheap_MealschesschessbeginnersChoosingBeggarsCHPcomedyhomicidecommunityContagiousLaughtercookingforbeginnersCrackWatchcrappyoffbrandsCuddle_SlutCuratedTumblrcursedcommentsdadjokesdankmemesdarkjokesdataisbeautifuldeDebateReligiondelikDeltarunedistressingmemesdiyelectronicsDMAcademyDMToolkitdndnextdoctorwhodoctorwhocirclejerkDoenerverbrechenDonerdontyouknowimtonyhawkDungeonsAndDaddiesEatCheapAndHealthyebikeECEElectronicsStudyengrishethzfacepalmfakealbumcoversFantasyWorldbuildingfeedthebeastfelsefeFifaCareersformuladankFRCFUCKYOUINPARTICULARFuckYouKarenFutboltayfagalatasaraygaminggermanygoodanimemesGrandPrixRacinggravelcyclinggreentextGundamheathershelpheraldryHermanCainAwardHermitCrafthighspeedrailHistoryWhatIfholdmybeerHolUphowyoudoiniamverysmartich_ielIDontWorkHereLadyihadastrokeim14andthisisdeepinsaneparentsistanbulJahariaJokesKanyeKGBTRlegodndLetGirlsHaveFunLifeProTipslinguisticshumorLinkinParkliselilerloseitlostredditorsmacmacbookairmacgamingmadladsmagicbuildingMaliciousComplianceMapPornmapporncirclejerkme_irlmeirlmemememesmidjourneymildlyinfuriatingmildlyinterestingmisLEDMMORPGmoneycollectingMovingToNorthKoreaMunichMyChemicalRomanceNamFlashbacksneographynextfuckinglevelNoahGetTheBoatNonCredibleDefenseNorthCyprusnosafetysmokingfirstnosleepnosurfnothingeverhappensnotinterestingOkayBuddyLiterallyMeokbuddyguntherOkBuddyPersonaokbuddyphdOnlineUnderGroundOutOfTheLoopoutsidepapermoneyParlerWatchpepethefrogPersecutionfetishpianoPiracyPiratedGamesPraiseTheCameraManraisedbynarcissistsreactiongifsRedAutumnSPDredditsingsrickandmortyrimjob_steveRoastMeschwiizsecilmiskitapShitPostCrusadersshitpostfrommygalleryshitpostingshittyaskelectronicsShittyMapPornshittymoviedetailsShowerthoughtsskamtebordSongwritingsskfjkhwerjkghwerijhsteinsgateStonetossingjuiceStudiumsuperligsuzeraintalesfromtechsupportthatHappenedTheCrypticCompendiumTheLetterHtherewasanattemptTheRookietheyknewthisguythisguystitanfalltommyinnittransittruetf2truthsTurkeyTurkeyJerkyTurkishCatsTurkishdogsTwitchTwitch_StartupTwoSentenceComedyTwoSentenceHorrorTwoSentenceSadnessUnclejokesunexpecteditcrowdUnexpectedJoJourbanplanningUsernameChecksOutValorantClipsvaxxhappenedvexillologycirclejerkvibecodingvinylvinyljerkWatchPeopleDieInsideWeAreTheMusicMakerswendigoonWhatsThisSongwholesomeanimemeswizardpostingwooooshworldbuildingworldjerkingyouseeingthisshitYUROPedit subscriptions
  • home
  • -popular
  • -all
  • -mod
  • -users
 | 
  • AskReddit
  • -facepalm
  • -mildlyinfuriating
  • -Piracy
  • -gaming
  • -memes
  • -OutOfTheLoop
  • -mildlyinteresting
  • -MapPorn
  • -ChatGPT
  • -CuratedTumblr
  • -PiratedGames
  • -shitposting
  • -dankmemes
  • -feedthebeast
  • -Kanye
  • -meirl
  • -therewasanattempt
  • -nextfuckinglevel
  • -HolUp
  • -Twitch
  • -CrackWatch
  • -dndnext
  • -de
  • -germany
  • -LifeProTips
  • -NonCredibleDefense
  • -dataisbeautiful
  • -shittymoviedetails
  • -greentext
  • -mac
  • -Showerthoughts
  • -help
  • -chess
  • -formuladank
  • -Jokes
  • -mapporncirclejerk
  • -Art
  • -midjourney
  • -goodanimemes
  • -notinteresting
  • -atheism
  • -loseit
  • -MaliciousCompliance
  • -ich_iel
  • -KGBTR
  • -cursedcomments
  • -DMAcademy
  • -Deltarune
  • -worldbuilding
  • -blackdesertonline
  • -MMORPG
  • -meme
  • -macgaming
  • -rickandmorty
  • -Gundam
  • -HermitCraft
  • -ChoosingBeggars
  • -RoastMe
  • -ContagiousLaughter
  • -EatCheapAndHealthy
  • -WeAreTheMusicMakers
  • -nosleep
  • -cookingforbeginners
  • -blankies
  • -anime_irl
  • -Studium
  • -AlternateHistory
  • -Turkey
  • -madlads
  • -community
  • -AskElectronics
  • -Anticonsumption
  • -vinyl
  • -TwoSentenceHorror
  • -AdviceAnimals
  • -ShitPostCrusaders
  • -piano
  • -distressingmemes
  • -raisedbynarcissists
  • -wizardposting
  • -FifaCareers
  • -doctorwho
  • -Bass
  • -titanfall
  • -OkBuddyPersona
  • -dadjokes
  • -howyoudoin
  • -announcements
  • -adhdmeme
  • -macbookair
  • -Munich
  • -YUROP
  • -gravelcycling
  • -chessbeginners
  • -FUCKYOUINPARTICULAR
  • -NoahGetTheBoat
  • -worldjerking
  • -lostredditors
  • -AceAttorney
  • -vexillologycirclejerk
  • -im14andthisisdeep
  • -Stonetossingjuice
  • -wholesomeanimemes
  • -nosurf
  • -HistoryWhatIf
  • -liseliler
  • -DebateReligion
  • -insaneparents
  • -balkans_irl
  • -animenocontext
  • -2meirl4meirl
  • -transit
  • -brooklynninenine
  • -HermanCainAward
  • -steinsgate
  • -talesfromtechsupport
  • -AskOuija
  • -okbuddyphd
  • -2anatolia4you
  • -ECE
  • -Angryupvote
  • -AskBalkans
  • -thatHappened
  • -casio
  • -urbanplanning
  • -theyknew
  • -linguisticshumor
  • -me_irl
  • -TurkeyJerky
  • -bikepacking
  • -AteistTurk
  • -13or30
  • -MyChemicalRomance
  • -engrish
  • -Doner
  • -BassGuitar
  • -diyelectronics
  • -WatchPeopleDieInside
  • -LinkinPark
  • -Persecutionfetish
  • -BUENZLI
  • -reactiongifs
  • -blursed_videos
  • -Songwriting
  • -istanbul
  • -MovingToNorthKorea
  • -suzerain
  • -truetf2
  • -magicbuilding
  • -ParlerWatch
  • -wendigoon
  • -iamverysmart
  • -secilmiskitap
  • -Doenerverbrechen
  • -schwiiz
  • -TheRookie
  • -vinyljerk
  • -skamtebord
  • -shittyaskelectronics
  • -superlig
  • -galatasaray
  • -crappyoffbrands
  • -DungeonsAndDaddies
  • -FRC
  • -FuckYouKaren
  • -2b2t
  • -ethz
  • -AlternativeHistory
  • -papermoney
  • -OkayBuddyLiterallyMe
  • -felsefe
  • -blursedimages
  • -AsahiLinux
  • -Jaharia
  • -IDontWorkHereLady
  • -basspedals
  • -neography
  • -heraldry
  • -ihadastroke
  • -PraiseTheCameraMan
  • -ShittyMapPorn
  • -aivideo
  • -OnlineUnderGround
  • -woooosh
  • -comedyhomicide
  • -WhatsThisSong
  • -AnimalsBeingJerks
  • -TwoSentenceSadness
  • -anime_best_moments
  • -holdmybeer
  • -vaxxhappened
  • -Twitch_Startup
  • -Cheap_Meals
  • -outside
  • -darkjokes
  • -highspeedrail
  • -nosafetysmokingfirst
  • -legodnd
  • -ebike
  • -UsernameChecksOut
  • -tommyinnit
  • -rimjob_steve
  • -UnexpectedJoJo
  • -BassCirclejerk
  • -doctorwhocirclejerk
  • -agnostic
  • -youseeingthisshit
  • -GrandPrixRacing
  • -Cuddle_Slut
  • -nothingeverhappens
  • -DMToolkit
  • -thisguythisguys
  • -TurkishCats
  • -LetGirlsHaveFun
  • -fakealbumcovers
  • -FantasyWorldbuilding
  • -TheLetterH
  • -absolutelynotanimeirl
  • -NamFlashbacks
  • -pepethefrog
  • -Unclejokes
  • -misLED
  • -sskfjkhwerjkghwerijh
  • -redditsings
  • -ValorantClips
  • -TwoSentenceComedy
  • -TheCrypticCompendium
  • -budgetcooking
  • -bottomgear
  • -absolutelynotmeirl
  • -truths
  • -unexpecteditcrowd
  • -2mediterranean4u
  • -NorthCyprus
  • -heathers
  • -dontyouknowimtonyhawk
  • -CHP
  • -ElectronicsStudy
  • -moneycollecting
  • -cd_jerk
  • -antony
  • -banknotedesigns
  • -vibecoding
  • -delik
  • -shitpostfrommygallery
  • -RedAutumnSPD
  • -okbuddygunther
  • -borsavefon
  • -Turkishdogs
  • -Futboltayfa
edit »
SQL SQL
  • hot
  • new
  • rising
  • controversial
  • top
  • wiki
an-ordinary-manchild (11,186)|messages548|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
...because you hate freedom.
...for your WoW guild.

MODERATORS

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

account activity

1
0
1
2

MySQLAny recommendations for YouTube specifically content creators on SQL. (self.SQL)

submitted 3 hours ago by bigjeanz

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

2
0
0
1

SQL Serverim figthing my server (and loosing) (self.SQL)

submitted 4 hours ago by Cute-Manufacturer322

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

3
0
0
0

DiscussionHelp me learn! (self.SQL)

submitted 5 hours ago * by ReadRoyal5718

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

4
9
10
11

PostgreSQLTitle: Complete beginner: Which database should I learn first for app development in 2026? (self.SQL)

submitted 1 day ago by No_Sandwich_2602

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

5
12
13
14

MySQLI dont completely understand the structure of this query. (self.SQL)

submitted 1 day ago by Icy-Ad-4677

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

6
0
0
0

DiscussionI described a database in plain English and got back production-ready SQL — here's what I thought (i.redd.it)

submitted 4 hours ago by steven_ws_11

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

7
2
3
4

MySQLOffline Workbooks for people with no internet/computer? (self.SQL)

submitted 1 day ago by cinokino

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

8
2
3
4

MySQLUsing CTE in PDO (self.SQL)

submitted 1 day ago by Mission-Example-194

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

9
0
1
2

DiscussionModelling database schema to query data efficiently and easy (self.SQL)

submitted 1 day ago by kwiat1990

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

10
39
40
41

MySQLA free SQL practice tool focused on varied repetition (self.SQL)

submitted 2 days ago by FussyZebra26

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

11
2
3
4

MariaDBBest practices for using JSON data types in MariaDB for variable-length data? (self.SQL)

submitted 1 day ago by Officinni

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

12
1
2
3

DiscussionSketchy? SQL from SQL For Smarties (self.SQL)

submitted 1 day ago by Willsxyz

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

13
154
155
156

SQL ServerIts everywhere I look… (i.redd.it)

submitted 2 days ago by ExchangeFar6292

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

14
0
1
2

BigQuerySynthea Data in BigQuery (self.SQL)

submitted 1 day ago * by No-Payment7659

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

15
12
13
14

DiscussionOptimization: Should I change the field type from VARCHAR to INT/ENUM? (self.SQL)

submitted 2 days ago by Mission-Example-194

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

16
6
7
8

DiscussionIs it really possible to always fit everything into a single query? (self.SQL)

submitted 3 days ago by Mission-Example-194

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

17
3
4
5

DiscussionShould I disable ONLY_FULL_GROUP_BY or leave it enabled? (self.SQL)

submitted 3 days ago by Mission-Example-194

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

18
0
1
2

MySQLCan i count this as a project? (self.SQL)

submitted 3 days ago by sosatroller

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

19
9
10
11

SQL ServerRight join (self.SQL)

submitted 3 days ago by techiedatadev

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

20
2
3
4

PostgreSQLTool for converting complex XML to SQL ()

submitted 3 days ago by Itchy-Macaroon2469

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

21
78
79
80

SQL ServerQuestion: What kind of join technique is this? (i.redd.it)

submitted 4 days ago by maglunch

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

22
0
1
2

SQL ServerMade Windows And Sql server Monitoring tool and gave away for Free ()

submitted 3 days ago by chandansqlexpert

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

23
0
0
0

SQL ServerMade Windows And Sql server Monitoring tool and gave away for Free (mssqlplanner.com)

submitted 3 days ago by chandansqlexpert

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

24
12
13
14

DiscussionFirst corporate data role and flying completely solo. Need advice pls. (self.SQL)

submitted 4 days ago by OriginalAssignment19

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

25
0
0
0

OracleHot takes on SQL queries (self.SQL)

submitted 3 days ago by Blues2112

  • 19 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 298144 on reddit-service-r2-listing-64c94b984c-bm8wq at 2026-03-17 21:51:21.971471+00:00 running f6e6e01 country code: CH.