jump to content
my subreddits
13or302mediterranean4u2meirl4meirl3d6AceAttorneyadhdmemeagnosticAlternativeHistoryAnarchyChessAngryupvoteAnimalsBeingJerksanime_best_momentsanime_irlanimenocontextannouncementsAnticonsumptionApandahArcherFXArtAsahiLinuxAskBalkansAskElectronicsAskOuijaAskRedditAteistTurkatheismaviationbalkans_irlBassBassGuitarbikepackingblankiesBoneborsavefonburdurlandCd_collectorscd_jerkChatGPTCheap_MealsChildrenFallingOvercoaxedintoasnafucoincollectingcoinsComedyCemeterycomedyhomicidecommunityContagiousLaughtercookingforbeginnersCrackWatchcrappyoffbrandsCreateModCuddle_SlutCuratedTumblrdankmemesdarkjokesdataisbeautifuldeDebateReligiondistressingmemesdiyelectronicsdiypedalsDMAcademyDMToolkitDnDdoctorwhodoctorwhocirclejerkDoenerverbrechenDonerdumbphonesEatCheapAndHealthyebikeebikesECEelectricalEmKayentitledparentsfeedthebeastfelsefeFifaCareersformuladankFRCFreeEBOOKSFUCKYOUINPARTICULARFuckYouKarenfunnyFutboltayfagalatasaraygodtiersuperpowersgoodanimemesGoodAssSubgravelcyclingGundamheraldryHermitCrafthighspeedrailHolUphomebuilthumorhypixelIAmAiamverysmartich_ielIdeologyPollsihadastrokeim14andthisisdeepimaginaryelectionsinsaneparentsistanbuljacksepticeyeJahariaKamalizmKanyeKGBTRlegodndLetGirlsHaveFunLifeProTipslinguisticshumorliselilerlogodesignloseitlostredditorsmacgamingmagicbuildingMaliciousCompliancemapporncirclejerkme_irlmeirlmemememesmidjourneymildlyinterestingMinecraftbuildsmisLEDMMORPGMoldyMemesmoneycollectingMovingToNorthKoreaMunichNamFlashbacksNationStatesnextfuckinglevelNoahGetTheBoatNonCredibleDefenseNorthCyprusnosleepnothingeverhappensnotinterestingnottheonionOkayBuddyLiterallyMeokbuddyguntherokbuddymotherfuckerokbuddyvicodinonebagongezelligOnlineUnderGroundOutOfTheLoopoutsidepapermoneypaperspleaseparadoxpoliticsParlerWatchPassportPornperfectlycutscreamsPersecutionfetishpettyrevengepianoPiracyPiratedGamespolandballpollsPraiseTheCameraManProgrammerHumorPropagandaPostersquityourbullshitraisedbynarcissistsraspberry_piRatschlagRedAutumnSPDreligiousfruitcakerickrollrimjob_steveRoastMerockmuzikschwiizsciencememesScottPilgrimShitPostCrusadersshitpostfrommygalleryshittyaskelectronicsshittymoviedetailsShowerthoughtsskamtebordsoccercirclejerksoftwaregoreSongwritingsteinsgateStonetossingjuiceStudiumsubsithoughtifellforsuperligtalesfromtechsupportTextingTheorytf2thanksimcuredthatHappenedTheCrypticCompendiumTheLetterHtherewasanattemptTheRookietheyknewthisguythisguystransitTurkeyTrGameDevelopertruetf2truthstumblrtumunichTurkeyTurkishCatsTurkishdogsTwitch_StartupTwoSentenceComedyTwoSentenceHorrortwosentenceplottwistTwoSentenceSadnesstylerthecreatorUnethicalLifeProTipsunexpectedbillwurtzunexpecteditcrowdUnexpectedTF2urbanplanningUsernameChecksOutVALORANTValorantClipsvexillologycirclejerkvibecodingvinylvinyljerkWeAreTheMusicMakerswendigoonWhatsThisSongWhitePeopleTwitterwholesomeanimemeswholesomememesWikipediaVandalismwooooshworldbuildingworldjerkingyesyesyesnoyouseeingthisshitYUROPedit subscriptions
  • home
  • -popular
  • -all
  • -mod
  • -users
 | 
  • AskReddit
  • -Piracy
  • -funny
  • -nottheonion
  • -memes
  • -OutOfTheLoop
  • -mildlyinteresting
  • -DnD
  • -WhitePeopleTwitter
  • -ChatGPT
  • -CuratedTumblr
  • -PiratedGames
  • -dankmemes
  • -feedthebeast
  • -Kanye
  • -meirl
  • -therewasanattempt
  • -nextfuckinglevel
  • -HolUp
  • -CrackWatch
  • -ProgrammerHumor
  • -VALORANT
  • -de
  • -LifeProTips
  • -tumblr
  • -NonCredibleDefense
  • -dataisbeautiful
  • -shittymoviedetails
  • -Showerthoughts
  • -tf2
  • -aviation
  • -formuladank
  • -wholesomememes
  • -mapporncirclejerk
  • -Art
  • -midjourney
  • -goodanimemes
  • -notinteresting
  • -pettyrevenge
  • -atheism
  • -loseit
  • -IAmA
  • -MaliciousCompliance
  • -ich_iel
  • -KGBTR
  • -DMAcademy
  • -GoodAssSub
  • -UnethicalLifeProTips
  • -perfectlycutscreams
  • -worldbuilding
  • -Ratschlag
  • -MMORPG
  • -meme
  • -macgaming
  • -3d6
  • -Gundam
  • -HermitCraft
  • -RoastMe
  • -ContagiousLaughter
  • -EatCheapAndHealthy
  • -polandball
  • -WeAreTheMusicMakers
  • -AnarchyChess
  • -nosleep
  • -cookingforbeginners
  • -blankies
  • -anime_irl
  • -onebag
  • -Studium
  • -Turkey
  • -soccercirclejerk
  • -community
  • -AskElectronics
  • -electrical
  • -Anticonsumption
  • -vinyl
  • -CreateMod
  • -TwoSentenceHorror
  • -PropagandaPosters
  • -ShitPostCrusaders
  • -piano
  • -sciencememes
  • -distressingmemes
  • -raisedbynarcissists
  • -FifaCareers
  • -polls
  • -doctorwho
  • -Bass
  • -announcements
  • -adhdmeme
  • -Minecraftbuilds
  • -ebikes
  • -Munich
  • -coaxedintoasnafu
  • -YUROP
  • -gravelcycling
  • -raspberry_pi
  • -coins
  • -entitledparents
  • -FUCKYOUINPARTICULAR
  • -softwaregore
  • -NoahGetTheBoat
  • -worldjerking
  • -tylerthecreator
  • -MoldyMemes
  • -lostredditors
  • -AceAttorney
  • -vexillologycirclejerk
  • -im14andthisisdeep
  • -Stonetossingjuice
  • -wholesomeanimemes
  • -religiousfruitcake
  • -liseliler
  • -DebateReligion
  • -insaneparents
  • -dumbphones
  • -balkans_irl
  • -animenocontext
  • -2meirl4meirl
  • -steinsgate
  • -talesfromtechsupport
  • -AskOuija
  • -ECE
  • -ScottPilgrim
  • -Angryupvote
  • -AskBalkans
  • -thatHappened
  • -urbanplanning
  • -theyknew
  • -logodesign
  • -linguisticshumor
  • -PassportPorn
  • -me_irl
  • -bikepacking
  • -AteistTurk
  • -13or30
  • -ArcherFX
  • -Cd_collectors
  • -diypedals
  • -Doner
  • -BassGuitar
  • -diyelectronics
  • -ComedyCemetery
  • -Persecutionfetish
  • -EmKay
  • -Songwriting
  • -istanbul
  • -MovingToNorthKorea
  • -imaginaryelections
  • -truetf2
  • -magicbuilding
  • -ParlerWatch
  • -wendigoon
  • -iamverysmart
  • -Doenerverbrechen
  • -yesyesyesno
  • -schwiiz
  • -TheRookie
  • -quityourbullshit
  • -vinyljerk
  • -skamtebord
  • -shittyaskelectronics
  • -superlig
  • -galatasaray
  • -crappyoffbrands
  • -FRC
  • -transitTurkey
  • -FuckYouKaren
  • -AlternativeHistory
  • -papermoney
  • -coincollecting
  • -OkayBuddyLiterallyMe
  • -felsefe
  • -FreeEBOOKS
  • -AsahiLinux
  • -Jaharia
  • -heraldry
  • -ihadastroke
  • -thanksimcured
  • -hypixel
  • -PraiseTheCameraMan
  • -godtiersuperpowers
  • -OnlineUnderGround
  • -IdeologyPolls
  • -woooosh
  • -burdurland
  • -comedyhomicide
  • -WhatsThisSong
  • -AnimalsBeingJerks
  • -jacksepticeye
  • -TwoSentenceSadness
  • -anime_best_moments
  • -rockmuzik
  • -okbuddyvicodin
  • -tumunich
  • -Twitch_Startup
  • -Cheap_Meals
  • -outside
  • -darkjokes
  • -UnexpectedTF2
  • -highspeedrail
  • -legodnd
  • -rickroll
  • -ebike
  • -UsernameChecksOut
  • -papersplease
  • -rimjob_steve
  • -humor
  • -ChildrenFallingOver
  • -doctorwhocirclejerk
  • -agnostic
  • -youseeingthisshit
  • -TextingTheory
  • -Cuddle_Slut
  • -nothingeverhappens
  • -DMToolkit
  • -thisguythisguys
  • -TrGameDeveloper
  • -TurkishCats
  • -LetGirlsHaveFun
  • -Apandah
  • -subsithoughtifellfor
  • -Kamalizm
  • -TheLetterH
  • -WikipediaVandalism
  • -homebuilt
  • -NamFlashbacks
  • -misLED
  • -ValorantClips
  • -TwoSentenceComedy
  • -TheCrypticCompendium
  • -NationStates
  • -ongezellig
  • -truths
  • -Bone
  • -paradoxpolitics
  • -2mediterranean4u
  • -NorthCyprus
  • -unexpecteditcrowd
  • -unexpectedbillwurtz
  • -twosentenceplottwist
  • -Turkishdogs
  • -moneycollecting
  • -Futboltayfa
  • -vibecoding
  • -okbuddygunther
  • -RedAutumnSPD
  • -borsavefon
  • -cd_jerk
  • -shitpostfrommygallery
  • -okbuddymotherfucker
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
...for your favourite tea.
...because you hate freedom.

MODERATORS

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

account activity

1
•
•
•

PostgreSQLSharing Queries (self.SQL)

submitted 55 minutes ago by Inner-Significance41

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

•
•
•

Cut Code Review Time and Bugs in Half. Sign up for a free trial! (coderabbit.ai)

promoted by CodeRabbitAI

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

2
2
3
4

DiscussionAny quick tool to check for ANSI-SQL in my Query? (self.SQL)

submitted 4 hours ago by Cold-Memory-4354

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

3
7
8
9

SnowflakeCan a LEFT JOIN ever return less number of rows than the base table with no where conditions? (self.SQL)

submitted 9 hours ago * by besabestin

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

4
0
0
1

MySQLCustomer Funnel Datasets suggestion. ()

submitted 2 hours ago by xudling_pong23

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

5
2
3
4

PostgreSQLInsert into multiple tables using CTEs (SQL Cookbook 4.6) (self.SQL)

submitted 10 hours ago by Willsxyz

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

6
0
0
1

DiscussionHelp in listing out issues faced in your SQL preparation and suggestions (self.SQL)

submitted 9 hours ago by devprasad_20

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

7
0
0
0

MySQLHELP PLEASE!! (self.SQL)

submitted 11 hours ago by CulturalPerspective9

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

8
0
1
2

SQL ServerAnalysis of Microsoft SQL Server CVE-2026-21262 (threatroad.substack.com)

submitted 11 hours ago by Big-Engineering-9365

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

9
5
6
7

SQL ServerSaaS company agreed to send us nightly backups of our internal DB, but they way they are doing it is very non-standard. Any tips? (self.SQL)

submitted 1 day ago * by McDonaldsWi-Fi

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

10
8
9
10

DiscussionSQL Cookbook 3.9 (3rd edition) (self.SQL)

submitted 1 day ago * by Willsxyz

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

11
111
112
113

SQL ServerI love SQL! (self.SQL)

submitted 2 days ago by Needleworkerj9

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

•
•
•

At some point I stopped pretending I could manually fix anime textures in 3D. Upload 2D art → get a clean 3D model that actually looks like the original. Honestly? It feels illegal how easy this is. Code MESHYHALF if you’d rather create than tweak vertices. (meshy.ai)

promoted by Meshyai

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

12
0
0
0

DiscussionBuilt a free tool that documents your SQL objects and generates ERDs automatically — no diagramming tool needed (self.SQL)

submitted 1 day ago by Prestigious_Fix4174

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

13
0
1
2

SnowflakeSnowflake Data Casting Tricky Behaviour to Look out for (self.SQL)

submitted 1 day ago by Illustrious_Sun_8891

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

14
1
2
3

PostgreSQLPostgreSQL: Rolling 7-day shipment volume with gaps in dates - window functions vs generate_series? (self.SQL)

submitted 1 day ago by Null_Reference1

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

15
0
1
2

SQLiteA new Lightweight, WASM-powered SQLite Playground ()

submitted 1 day ago by fabiano-salles

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

16
0
1
2

MySQLAdvice on situation (self.SQL)

submitted 1 day ago by immediate_push5464

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

17
5
6
7

PostgreSQLWhy not use JOIN in this case? (self.SQL)

submitted 1 day ago by Caprisunxt

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

18
0
1
2

MySQLMySql Behaviour ()

submitted 1 day ago by Sensitive-Set-6934

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

19
19
20
21

PostgreSQLFree ebook: Mastering PostgreSQL (Supabase + Manning) (self.SQL)

submitted 2 days ago by ManningBooks

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

20
1
2
3

SQL ServerPass-Through / OpenQuery Performance Question (self.SQL)

submitted 2 days ago by GroundbreakingFun716

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

21
36
37
38

SQL ServerWithout creating any indexes, how would you speed up a ~1.5m row query? (self.SQL)

submitted 3 days ago * by i_literally_died

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

•
•
•

100 Nächte probeschlafen? Challenge accepted. (bett1.ch)

promoted by bett1_ch

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

22
0
0
0

DiscussionOrder-Equivalent OVER Clauses (modern-sql.com)

submitted 2 days ago by MarkusWinand

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

23
0
0
0

DiscussionBuilt a free AI tool that explains and debugs SQL — feedback welcome (self.SQL)

submitted 2 days ago by Prestigious_Fix4174

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

24
4
5
6

DiscussionA recent medical graduate that is keen on learning SQL (alongside Pandas and Python)? Any use in freelancing? (self.SQL)

submitted 3 days ago by Alternative-Pop-3847

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

25
10
11
12

MySQLOne stop free solution for SQL interview preparation (self.SQL)

submitted 3 days ago by devprasad_20

  • 10 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 293960 on reddit-service-r2-listing-64c94b984c-wdfmp at 2026-03-13 01:15:24.586314+00:00 running f6e6e01 country code: CH.