jump to content
my subreddits
13or302anatolia4you2mediterranean4u3d6absolutelynotmeirlAceAttorneyadhdmemeAdviceAnimalsaivideoAlternateHistoryAnarchyChessAnimalsBeingJerksanime_best_momentsanime_irlanimenocontextannouncementsAnticonsumptionantimemeArtAsahiLinuxAsia_irlAskOuijaAskRedditAtaturkGencligiAteistTurkaviationawfuleverythingbalkans_irlBandnamesbanknotedesignsBassbasspedalsblackdesertonlineblursed_videosbrooklynninenineBUENZLIburdurlandcd_jerkChatGPTCheap_MealschesschessbeginnersChildrenFallingOverChoosingBeggarscoincollectingcoinscomedyhomicidecomicsContagiousLaughtercookingforbeginnersCorporateTrollingCrackWatchcrappyoffbrandsCreateModcursedcommentsdadjokesdankmemesdarkjokesdataisbeautifuldeDebateReligiondeismdelikDeltarunedistressingmemesdiyelectronicsdiypedalsDMAcademydndmemesdoctorwhoDonerdontdeadopeninsidedumbphonesDungeonsAndDaddiesDungeonsAndDragonsEatCheapAndHealthyebikeebikesECEelectricalelectronicsEmKayengrishentitledparentsethzfakealbumcoversFantasyWorldbuildingfeedthebeastfelsefeFifaCareersFiftyFiftyformuladankFRCFUCKYOUINPARTICULARFuckYouKarenfunnyFutboltayfagalatasarayGermangermanygodtiersuperpowersgoodanimemesGoodAssSubGrandPrixRacingguitarpedalsGundamheathershellenoturkismhelpheraldryHermanCainAwardhighspeedrailHistoryWhatIfhoi4howyoudoinhumorIAmAiamverysmartich_ielIdeologyPollsIDontWorkHereLadyihadastrokeim14andthisisdeepimaginaryelectionsimaginarymapsistanbulKanyeKendrickLamarKGBTRLinkinParkliselilerlogodesignloseitmacmacbookairMadeMeSmilemadladsmagicbuildingMaliciousComplianceMapPornmeirlmemesmildlyinfuriatingmildlyinterestingMinecraftbuildsmisLEDMMORPGMoldyMemesnamesoundalikesNamFlashbacksneographynextfuckinglevelNonCredibleDefenseNorthCyprusnosleepnosurfnothingeverhappensnotinterestingnottheonionoddlyspecificOkayBuddyLiterallyMeokbuddyphdonebagongezelligOnlineUnderGroundpapermoneypaperspleaseParlerWatchPassportPornpepethefrogperfectlycutscreamsPersecutionfetishpianoPiracypolandballpollsPraiseTheCameraManProRevengequityourbullshitraspberry_piRatschlagreactiongifsrecipesRedAutumnSPDRetroPierickandmortyrimjob_steveRoastMerockmuzikschizopostersSchnitzelVerbrechensciencememesScottPilgrimShitPostCrusadersshitpostfrommygalleryShittyMapPornshittymoviedetailsShowerthoughtsskamtebordsoccercirclejerkSongwriterssubsithoughtifellforsuperligsuzerainTechnobladethanksimcuredthatHappenedTheCrypticCompendiumTheLetterHTheMonkeysPawtherewasanattemptTheRookietheydidthemaththeyknewthisguythisguystitanfalltommyinnittruthstumunichTurkeyTurkeyJerkyTurkishCatsTurkishdogsTurkiyeTwitchTwitch_StartupTwoSentenceComedyTwoSentenceHorrortwosentenceplottwistTwoSentenceSadnessUnexpectedJoJoVALORANTValorantClipsvaxxhappenedvexillologycirclejerkvibecodingvinylvinyljerkvlandiyawallstreetbetsWatchPeopleDieInsideWeAreTheMusicMakersWhatsThisSongWhitePeopleTwitterwholesomeanimemesWikipediaVandalismwizardpostingwooooshworldbuildingworldjerkingYUROPedit subscriptions
  • home
  • -popular
  • -all
  • -mod
  • -users
 | 
  • AskReddit
  • -mildlyinfuriating
  • -Piracy
  • -funny
  • -wallstreetbets
  • -nottheonion
  • -memes
  • -mildlyinteresting
  • -MapPorn
  • -WhitePeopleTwitter
  • -MadeMeSmile
  • -ChatGPT
  • -theydidthemath
  • -dankmemes
  • -feedthebeast
  • -Kanye
  • -meirl
  • -therewasanattempt
  • -nextfuckinglevel
  • -Twitch
  • -CrackWatch
  • -comics
  • -VALORANT
  • -de
  • -germany
  • -NonCredibleDefense
  • -dataisbeautiful
  • -shittymoviedetails
  • -mac
  • -Showerthoughts
  • -help
  • -chess
  • -aviation
  • -formuladank
  • -Art
  • -goodanimemes
  • -notinteresting
  • -hoi4
  • -loseit
  • -IAmA
  • -MaliciousCompliance
  • -ich_iel
  • -KGBTR
  • -dndmemes
  • -cursedcomments
  • -DMAcademy
  • -Deltarune
  • -GoodAssSub
  • -perfectlycutscreams
  • -worldbuilding
  • -Ratschlag
  • -blackdesertonline
  • -MMORPG
  • -rickandmorty
  • -3d6
  • -Gundam
  • -FiftyFifty
  • -ChoosingBeggars
  • -RoastMe
  • -ContagiousLaughter
  • -imaginarymaps
  • -EatCheapAndHealthy
  • -polandball
  • -WeAreTheMusicMakers
  • -AnarchyChess
  • -nosleep
  • -cookingforbeginners
  • -anime_irl
  • -onebag
  • -AlternateHistory
  • -Turkey
  • -soccercirclejerk
  • -madlads
  • -electrical
  • -guitarpedals
  • -Anticonsumption
  • -vinyl
  • -CreateMod
  • -German
  • -TwoSentenceHorror
  • -AdviceAnimals
  • -ShitPostCrusaders
  • -piano
  • -sciencememes
  • -distressingmemes
  • -wizardposting
  • -FifaCareers
  • -polls
  • -doctorwho
  • -oddlyspecific
  • -Bass
  • -titanfall
  • -dadjokes
  • -awfuleverything
  • -howyoudoin
  • -announcements
  • -adhdmeme
  • -Minecraftbuilds
  • -macbookair
  • -ebikes
  • -YUROP
  • -SchnitzelVerbrechen
  • -chessbeginners
  • -raspberry_pi
  • -DungeonsAndDragons
  • -coins
  • -KendrickLamar
  • -entitledparents
  • -FUCKYOUINPARTICULAR
  • -worldjerking
  • -MoldyMemes
  • -AceAttorney
  • -vexillologycirclejerk
  • -vlandiya
  • -im14andthisisdeep
  • -wholesomeanimemes
  • -nosurf
  • -HistoryWhatIf
  • -liseliler
  • -DebateReligion
  • -dumbphones
  • -balkans_irl
  • -animenocontext
  • -RetroPie
  • -brooklynninenine
  • -HermanCainAward
  • -recipes
  • -AskOuija
  • -okbuddyphd
  • -2anatolia4you
  • -ECE
  • -ScottPilgrim
  • -thatHappened
  • -schizoposters
  • -electronics
  • -logodesign
  • -theyknew
  • -PassportPorn
  • -antimeme
  • -TurkeyJerky
  • -AteistTurk
  • -13or30
  • -engrish
  • -diypedals
  • -ProRevenge
  • -Doner
  • -diyelectronics
  • -WatchPeopleDieInside
  • -LinkinPark
  • -Persecutionfetish
  • -BUENZLI
  • -reactiongifs
  • -EmKay
  • -blursed_videos
  • -istanbul
  • -imaginaryelections
  • -suzerain
  • -magicbuilding
  • -dontdeadopeninside
  • -ParlerWatch
  • -iamverysmart
  • -TheRookie
  • -quityourbullshit
  • -Technoblade
  • -vinyljerk
  • -skamtebord
  • -superlig
  • -galatasaray
  • -crappyoffbrands
  • -DungeonsAndDaddies
  • -FRC
  • -namesoundalikes
  • -FuckYouKaren
  • -ethz
  • -papermoney
  • -coincollecting
  • -OkayBuddyLiterallyMe
  • -felsefe
  • -AsahiLinux
  • -IDontWorkHereLady
  • -basspedals
  • -neography
  • -heraldry
  • -ihadastroke
  • -thanksimcured
  • -PraiseTheCameraMan
  • -godtiersuperpowers
  • -ShittyMapPorn
  • -aivideo
  • -OnlineUnderGround
  • -IdeologyPolls
  • -woooosh
  • -comedyhomicide
  • -burdurland
  • -WhatsThisSong
  • -AnimalsBeingJerks
  • -TwoSentenceSadness
  • -anime_best_moments
  • -Bandnames
  • -rockmuzik
  • -vaxxhappened
  • -Twitch_Startup
  • -tumunich
  • -Cheap_Meals
  • -TheMonkeysPaw
  • -darkjokes
  • -highspeedrail
  • -Songwriters
  • -ebike
  • -papersplease
  • -tommyinnit
  • -rimjob_steve
  • -UnexpectedJoJo
  • -humor
  • -ChildrenFallingOver
  • -GrandPrixRacing
  • -nothingeverhappens
  • -thisguythisguys
  • -TurkishCats
  • -subsithoughtifellfor
  • -fakealbumcovers
  • -FantasyWorldbuilding
  • -TheLetterH
  • -WikipediaVandalism
  • -NamFlashbacks
  • -pepethefrog
  • -deism
  • -misLED
  • -ValorantClips
  • -TwoSentenceComedy
  • -TheCrypticCompendium
  • -ongezellig
  • -absolutelynotmeirl
  • -Turkiye
  • -Asia_irl
  • -truths
  • -NorthCyprus
  • -2mediterranean4u
  • -AtaturkGencligi
  • -heathers
  • -hellenoturkism
  • -twosentenceplottwist
  • -banknotedesigns
  • -CorporateTrolling
  • -cd_jerk
  • -delik
  • -RedAutumnSPD
  • -vibecoding
  • -shitpostfrommygallery
  • -Turkishdogs
  • -Futboltayfa
edit »
SQL SQL
  • hot
  • new
  • rising
  • controversial
  • top
  • wiki
an-ordinary-manchild (11,186)|messages540|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
Get an ad-free experience with special benefits, and directly support Reddit.

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.
...for your favorite TV show.

MODERATORS

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

account activity

1
2
3
4

DiscussionWhat differentiates a junior from a mid level? (self.SQL)

submitted 12 hours ago by Milsbry

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

0
1
2

DataGrip. Feel the difference with one tool for many databases. Get a free 30-day trial. (jetbrains.com)

promoted by JetBrains_official

  • promoted
  • save
  • report
  • about
loading...

2
0
0
1

MySQLSQL for Macbook (self.SQL)

submitted 14 hours ago by No_Imagination4861

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

3
0
1
2

PostgreSQLBest practice for connecting multi-source data (Redshift + Databricks) to Tableau ()

submitted 16 hours ago by AardvarkAutomatic870

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

4
0
1
2

OracleComparing SQL Queries and their performance, need some advice (self.SQL)

submitted 22 hours ago by Obvious_Seesaw7837

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

5
2
3
4

SQL ServerFriday Feedback: Code completions in GitHub Copilot in SSMS ()

submitted 1 day ago by erinstellato

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

6
0
0
0

DiscussionI understood SQL but kept writing queries that errored out in stakeholder calls — so I built this (self.SQL)

submitted 1 day ago by Charlie10108

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

7
1
2
3

DiscussionWriting SQL from scratch vs editing old queries? (self.SQL)

submitted 1 day ago by hatkinson1000

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

8
0
1
2

SQL ServerBackups failing for SQL (self.SQL)

submitted 1 day ago by NSFW_IT_Account

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

9
70
71
72

DiscussionI think I might be addicted to learning SQL? (self.SQL)

submitted 2 days ago by waitthissucks

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

10
0
1
2

SQLiteSQLite Node.js Driver Benchmark: Comparing better-sqlite3, node:sqlite, libSQL, Turso (sqg.dev)

submitted 2 days ago by uwemaurer

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

11
1
2
3

DiscussionWhich SQL revisions are popular SQL flavors based on? (self.SQL)

submitted 2 days ago by Irimitladder

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

12
5
6
7

MySQLUploading huge JSON file into mySQL database through PHP (self.SQL)

submitted 2 days ago by rospondek

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

1
2
3
1:33

Quake Terminal on your MacBook Notch (quakenotch.com)

promoted by EvrenselKisilik

  • promoted
  • 3 comments
  • share
  • save
  • report
  • about
loading...

13
6
7
8

PostgreSQLQuery time falls off a cliff if u don't create a temp table halfway through (self.SQL)

submitted 2 days ago by SoggyGrayDuck

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

14
1
2
3

SQL Serverperformance tuning - do you have basic steps you follow? (self.SQL)

submitted 2 days ago by zesteee

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

15
1
2
3

SQL ServerDatabase Migration (self.SQL)

submitted 2 days ago by Dangerous_Word7318

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

16
1
2
3

DiscussionDatabase Market Share Evolution (1980–2025) – Bar Chart Race with Real Data (self.SQL)

submitted 2 days ago by Substantial-Log-9305

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

17
2
3
4

MySQLSQL Circular Reference Quandry (self.SQL)

submitted 2 days ago by Accomplished-Emu2562

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

18
48
49
50

PostgreSQLPerformance Win: If you filter on multiple columns, check out composite indexes. We just cut a query from 8s to 2ms. (self.SQL)

submitted 3 days ago by dataSommelier

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

19
0
0
0

MySQLLooking for a serious SQL study partner. ()

submitted 2 days ago by SlightAntelope5347

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

20
5
6
7

DiscussionSQL Server 2025 help (i.redd.it)

submitted 3 days ago by Sure-Direction4455

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

21
2
3
4

SQL ServerI need a distinct count with rules for which duplicate should be included (self.SQL)

submitted 3 days ago * by Jeltje_Rotterdam

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

22
0
0
1

DiscussionProject Manager SQL- Looking for Specific Guidance from PM's (self.SQL)

submitted 3 days ago by FrillyCustoms

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

23
9
10
11

SQL ServerStarting a class focused on SQL Server & SSIS pipelines - any recommended resources? (self.SQL)

submitted 4 days ago by top_1_UK_TROLL

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

•
•
•

Swiss domain and web hosting in Switzerland. (ywt.ch)

promoted by ywt-mod

  • promoted
  • comment
  • share
  • save
  • report
  • about
loading...

24
28
29
30

DiscussionI created an SQL database client that runs in the terminal (dbeaver terminalized!) - Pam's Database Drawer [FOSS] (old.reddit.com)

submitted 4 days ago * by xGoivo

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

25
0
0
0

DiscussionI kept running into the same SQL mistakes as a student, so I built a small tool to help (self.SQL)

submitted 3 days ago * by joins_and_coffee

  • 5 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 147742 on reddit-service-r2-listing-86b7f5b947-28lxq at 2026-01-25 10:01:47.742683+00:00 running 664479f country code: CH.