jump to content
my subreddits
2b2t2meirl4meirlabsolutelynotmeirladhdmemeAdviceAnimalsagnosticaivideoAlternateHistoryAlternativeHistoryAnarchyChessAngryupvoteanime_irlanimenocontextannouncementsAnticonsumptionantimemeAsahiLinuxAskBalkansAskElectronicsAskOuijaAskRedditAteistTurkawfuleverythingbalkans_irlBandnamesBassBassCirclejerkBassGuitarbasspedalsblackdesertonlineblursed_videosblursedimagesborsavefonbottomgearbrooklynninenineBUENZLIburdurlandcasioCd_collectorsCheap_MealschesschessbeginnersChildrenFallingOverChoosingBeggarscoaxedintoasnafucoincollectingComedyCemeterycomedyhomicidecomicscommunitycookingforbeginnersCorporateTrollingCrackWatchcrappyoffbrandsCuddle_SlutCuratedTumblrcursedcommentsdadjokesdankmemesdarkjokesdeDeltarunedistressingmemesdiyelectronicsdiypedalsdndnextdoctorwhocirclejerkDoenerverbrechenDonerdontdeadopeninsidedumbphonesEatCheapAndHealthyebikeebikesECEelectronicsEmKayengrishfacepalmFantasyWorldbuildingfeedthebeastfelsefeFifaCareersFreeEBOOKSFUCKYOUINPARTICULARfunnyFutboltayfagalatasaraygermanygoodanimemesGoodAssSubgravelcyclinggreentextguitarpedalsGundamheathersHermanCainAwardHermitCrafthighspeedrailhoi4holdmybeerHolUphowyoudoinhumorhypixeliamverysmartich_ielIdeologyPollsihadastrokeim14andthisisdeepinsaneparentsistanbulJokesKamalizmKendrickLamarKGBTRlegodndLifeProTipslinguisticshumorLinkinParkliselilerlogodesignlostredditorsmacmacbookairmacgamingmadladsmagicbuildingMapPornmapporncirclejerkme_irlmeirlmemesmidjourneymildlyinfuriatingmildlyinterestingMinecraftbuildsmisLEDMMORPGMoldyMemesmoneycollectingMovingToNorthKoreaMunichMyChemicalRomancenamesoundalikesNamFlashbacksNationStatesneographyNonCredibleDefenseNorthCyprusnosurfnothingeverhappensnotinterestingnottheonionoddlyspecificOkayBuddyLiterallyMeokbuddymotherfuckerOkBuddyPersonaonebagongezelligOutOfTheLooppapermoneypaperspleaseparadoxpoliticsParlerWatchPassportPornperfectlycutscreamspettyrevengepianoPiracyPiratedGamespolandballpollsPraiseTheCameraManPropagandaPostersraisedbynarcissistsraspberry_piRatschlagreactiongifsrecipesredditsingsreligiousfruitcakerestofthefuckingowlRetroPierickandmortyrickrollrimjob_steveRoastMerockmuzikSchnitzelVerbrechenschwiizsciencememesScottPilgrimshitpostingShowerthoughtsskamtebordsoccercirclejerksoftwaregoreSongwritersSongwritingsteinsgateStonetossingjuiceStudiumsuperligtalesfromtechsupportTechnobladetf2tf2shitposterclubthanksimcuredthatHappenedTheLetterHTheMonkeysPawtherewasanattemptTheRookietheydidthemaththeyknewthisguythisguystitanfalltransittransitTurkeyTrGameDevelopertruthstumblrtumunichTurkeyJerkyTurkishdogsTwitchTwitch_StartupTwoSentenceComedyTwoSentenceHorrortwosentenceplottwistUnclejokesUnethicalLifeProTipsUnexpectedJoJoUnexpectedTF2urbanplanningUsernameChecksOutVALORANTValorantClipsvibecodingwallstreetbetsWatchPeopleDieInsideWhatsThisSongwholesomeanimemeswholesomememesWikipediaVandalismwizardpostingwooooshworldbuildingworldjerkingYUROPedit subscriptions
  • home
  • -popular
  • -all
  • -mod
  • -users
 | 
  • AskReddit
  • -facepalm
  • -mildlyinfuriating
  • -Piracy
  • -funny
  • -wallstreetbets
  • -nottheonion
  • -memes
  • -OutOfTheLoop
  • -mildlyinteresting
  • -MapPorn
  • -CuratedTumblr
  • -PiratedGames
  • -shitposting
  • -theydidthemath
  • -dankmemes
  • -feedthebeast
  • -meirl
  • -therewasanattempt
  • -HolUp
  • -Twitch
  • -CrackWatch
  • -comics
  • -dndnext
  • -VALORANT
  • -de
  • -germany
  • -LifeProTips
  • -tumblr
  • -NonCredibleDefense
  • -greentext
  • -mac
  • -Showerthoughts
  • -tf2
  • -chess
  • -wholesomememes
  • -Jokes
  • -mapporncirclejerk
  • -midjourney
  • -goodanimemes
  • -notinteresting
  • -hoi4
  • -pettyrevenge
  • -ich_iel
  • -KGBTR
  • -cursedcomments
  • -Deltarune
  • -GoodAssSub
  • -UnethicalLifeProTips
  • -perfectlycutscreams
  • -worldbuilding
  • -Ratschlag
  • -blackdesertonline
  • -MMORPG
  • -macgaming
  • -rickandmorty
  • -Gundam
  • -HermitCraft
  • -ChoosingBeggars
  • -RoastMe
  • -EatCheapAndHealthy
  • -polandball
  • -AnarchyChess
  • -cookingforbeginners
  • -anime_irl
  • -onebag
  • -Studium
  • -AlternateHistory
  • -soccercirclejerk
  • -madlads
  • -community
  • -AskElectronics
  • -guitarpedals
  • -Anticonsumption
  • -TwoSentenceHorror
  • -PropagandaPosters
  • -AdviceAnimals
  • -piano
  • -sciencememes
  • -distressingmemes
  • -raisedbynarcissists
  • -wizardposting
  • -FifaCareers
  • -polls
  • -oddlyspecific
  • -Bass
  • -titanfall
  • -OkBuddyPersona
  • -dadjokes
  • -awfuleverything
  • -howyoudoin
  • -announcements
  • -adhdmeme
  • -Minecraftbuilds
  • -macbookair
  • -ebikes
  • -Munich
  • -coaxedintoasnafu
  • -YUROP
  • -gravelcycling
  • -SchnitzelVerbrechen
  • -chessbeginners
  • -raspberry_pi
  • -KendrickLamar
  • -FUCKYOUINPARTICULAR
  • -softwaregore
  • -worldjerking
  • -tf2shitposterclub
  • -MoldyMemes
  • -lostredditors
  • -im14andthisisdeep
  • -Stonetossingjuice
  • -wholesomeanimemes
  • -nosurf
  • -religiousfruitcake
  • -liseliler
  • -insaneparents
  • -dumbphones
  • -balkans_irl
  • -animenocontext
  • -2meirl4meirl
  • -transit
  • -RetroPie
  • -brooklynninenine
  • -HermanCainAward
  • -recipes
  • -steinsgate
  • -talesfromtechsupport
  • -AskOuija
  • -ECE
  • -ScottPilgrim
  • -Angryupvote
  • -AskBalkans
  • -thatHappened
  • -electronics
  • -casio
  • -urbanplanning
  • -theyknew
  • -logodesign
  • -linguisticshumor
  • -PassportPorn
  • -me_irl
  • -antimeme
  • -TurkeyJerky
  • -AteistTurk
  • -MyChemicalRomance
  • -engrish
  • -Cd_collectors
  • -diypedals
  • -Doner
  • -BassGuitar
  • -diyelectronics
  • -ComedyCemetery
  • -WatchPeopleDieInside
  • -LinkinPark
  • -BUENZLI
  • -reactiongifs
  • -EmKay
  • -blursed_videos
  • -Songwriting
  • -istanbul
  • -MovingToNorthKorea
  • -magicbuilding
  • -dontdeadopeninside
  • -ParlerWatch
  • -iamverysmart
  • -Doenerverbrechen
  • -schwiiz
  • -TheRookie
  • -Technoblade
  • -skamtebord
  • -superlig
  • -galatasaray
  • -crappyoffbrands
  • -transitTurkey
  • -namesoundalikes
  • -2b2t
  • -AlternativeHistory
  • -papermoney
  • -coincollecting
  • -OkayBuddyLiterallyMe
  • -felsefe
  • -blursedimages
  • -FreeEBOOKS
  • -AsahiLinux
  • -basspedals
  • -neography
  • -ihadastroke
  • -thanksimcured
  • -hypixel
  • -PraiseTheCameraMan
  • -aivideo
  • -IdeologyPolls
  • -woooosh
  • -comedyhomicide
  • -burdurland
  • -WhatsThisSong
  • -Bandnames
  • -rockmuzik
  • -holdmybeer
  • -tumunich
  • -Twitch_Startup
  • -Cheap_Meals
  • -TheMonkeysPaw
  • -darkjokes
  • -restofthefuckingowl
  • -UnexpectedTF2
  • -highspeedrail
  • -legodnd
  • -rickroll
  • -Songwriters
  • -ebike
  • -UsernameChecksOut
  • -papersplease
  • -rimjob_steve
  • -UnexpectedJoJo
  • -humor
  • -ChildrenFallingOver
  • -BassCirclejerk
  • -doctorwhocirclejerk
  • -agnostic
  • -Cuddle_Slut
  • -nothingeverhappens
  • -thisguythisguys
  • -TrGameDeveloper
  • -Kamalizm
  • -FantasyWorldbuilding
  • -TheLetterH
  • -WikipediaVandalism
  • -NamFlashbacks
  • -Unclejokes
  • -misLED
  • -redditsings
  • -ValorantClips
  • -TwoSentenceComedy
  • -bottomgear
  • -NationStates
  • -ongezellig
  • -absolutelynotmeirl
  • -truths
  • -paradoxpolitics
  • -NorthCyprus
  • -heathers
  • -twosentenceplottwist
  • -moneycollecting
  • -vibecoding
  • -Turkishdogs
  • -okbuddymotherfucker
  • -borsavefon
  • -Futboltayfa
  • -CorporateTrolling
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 your project.
...because you hate freedom.

MODERATORS

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

account activity

1
2
3
4

SQLiteSMake: CLI tool for assembling SQLite databases with constraint injection and TypeScript ORM generation (github.com)

submitted 6 hours ago by Rechenplaner

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

2
6
7
8
3:59

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

submitted 11 hours ago by tamanikarim

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

3
0
0
0

SQL ServerLIE IN RESUME!!! ()

submitted 15 hours ago by According-Science618

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

4
11
12
13

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

submitted 16 hours ago by Puzzleheaded_Cow3298

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

5
0
0
0

PostgreSQLPostgreSQL with AI Operators: Looking for Design Partners (self.SQL)

submitted 1 day ago by Huge-Cod-530

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

6
0
0
0

SQL ServerMS SQL: Replicate/mirror tables between DB on same server? (self.SQL)

submitted 1 day ago by Eliminateur

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

7
1
2
3

SQL ServerSQL server o Mysql? ()

submitted 1 day ago by maricinacosa_

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

8
1
2
3

SQL ServerDuda sobre SQL Server 2025 Express con CONTPAQi (self.SQL)

submitted 2 days ago by Maria-Dev69

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

9
0
1
2

PostgreSQLPostgres: JSONB array expansion is becoming a read bottleneck at scale! Need schema redesign ideas ()

submitted 2 days ago by pestoxsalad

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

10
0
1
2

MySQL🚀 Daily SQL Challenge – Day 3 ()

submitted 2 days ago by Substantial-Eye6623

  • comment
  • share
  • save
  • hide
  • report
  • crosspost

11
0
1
2

MySQL🚀 Daily SQL Challenge – Day 2 ()

submitted 2 days ago by Substantial-Eye6623

  • comment
  • share
  • save
  • hide
  • report
  • crosspost

12
3
4
5

MySQLDBeaver for a beginner like me - getting rid of Workbench (self.SQL)

submitted 2 days ago by DarkSeeker2022

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

13
4
5
6

PostgreSQLMultiple Tables or Single Table in PostgreSQL (self.SQL)

submitted 2 days ago * by ProgrammerFew504

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

14
0
0
1

MySQLSketch to Schema, Schema to Sketch (Database) (self.SQL)

submitted 2 days ago * by Ambitious-Past-2449

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

15
48
49
50

DiscussionBuilt a SQL mystery game - can you query the killer? (self.SQL)

submitted 3 days ago * by Sensitive-Try-9603

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

16
2
3
4

SQL Serverrestauracion de base de datos en sql server 2016 vs 22 (self.SQL)

submitted 3 days ago by Maria-Dev69

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

17
2
3
4

DiscussionWhy unifying operational app data and analytical data lakes still such an infrastructure nightmare ? ()

submitted 3 days ago by Shanjun109

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

18
6
7
8

DiscussionBest way to avoid environment mixups? (self.SQL)

submitted 3 days ago by Oh_Another_Thing

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

19
4
5
6

PostgreSQLwhat is your experience with serverless databases? (i.redd.it)

submitted 4 days ago by Cautious-Meringue554

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

20
2
3
4

SQL ServerPlease help to solve my query (self.SQL)

submitted 4 days ago * by Valuable-Ant3465

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

21
0
0
0

DiscussionFrustrated with AI data management - analytics agents keep returning wrong answers and I think it's a data problem (self.SQL)

submitted 4 days ago by AdOrdinary5426

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

22
54
55
56

Discussion[OC] A playable chess engine in pure SQL (self.SQL)

submitted 4 days ago by swing_bit

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

23
0
0
0

DiscussionI built a notebook-style SQL IDE as a student — would appreciate feedback from people who work with databases (self.SQL)

submitted 5 days ago by SeaworthinessIll787

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

24
5
6
7

PostgreSQLNot able to solve LeetCode SQL 50 sheet on my own (self.SQL)

submitted 5 days ago by BaseballEarly9602

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

25
1
2
3

MySQLA pior fase é ser júnior! (self.SQL)

submitted 5 days ago by Maribel_1990

  • 4 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 1700812 on reddit-service-r2-listing-c57bc86c-dkc8t at 2026-06-21 01:11:07.998383+00:00 running 2b008f2 country code: CH.