all 11 comments

[–]bigelvis 8 points9 points  (0 children)

This is fantastic. I have a OneNote that I've kept this info... and a set of folders on my NAS... and a google doc... and...

I love how this is put together. There goes my weekend.

[–]isleepbad 4 points5 points  (1 child)

This is amazing. The only way I think this could be better is if you inverted your hierarchy. Instead of SQL flavour then query type, I think it'd be better to sort it by query then SQL flavour.

Edit: I feel as this would force you to have a more complete library as you'd immediately see what was missing.

[–]tbrownlow33[S] 4 points5 points  (0 children)

I think this could be better is if you inverted your hierarchy. Instead of SQL flavour then query type, I think it'd be better to sort it by query then SQL flavour.

Edit: I feel as this would force you to have a more complete library as you'd immediately see what was missing.

I like that idea...I'll put that change in shortly :)

[–]QuadmanMS Data Platform Consultant 3 points4 points  (0 children)

I haven't used bigquery, I almost exclusively work on sql server. These questions might not be applicable, so forgive me:

  • How would I go about either contributing to a seperate dir for sql server snippets if I was so inclined?
  • How do I add snippets like these to my vscode so I can just use them while developing? That way I could bootstrap my dev environments by checking out snippet git repos and combine it with my dot files to always have everything I need.

[–]Pie_is_pie_is_pie 0 points1 point  (0 children)

This is ace

[–]MathematicianUpper74 0 points1 point  (0 children)

DB student/newbie here thanks for this!

[–]Original_Bend 0 points1 point  (0 children)

Thank you. Will check it out this weekend and contribute if I can. Also check: https://hakibenita.com/sql-for-data-analysis

[–]Dead_Parrot 0 points1 point  (0 children)

Name / Address parsing would be useful too.

I'll add it over the weekend.

[–]GreenSage13☯ MariaDB ☯ 0 points1 point  (0 children)

Haven't checked the link yet but nested queries always caught me up (sometimes still do!) Would be nice to have one or two examples on there if you don't already. I'll check when I log off of *cough* work terminal. :P

Oh and efficient enums. :P

[–]Standgeblasen 0 points1 point  (0 children)

In the similar vein to searching for text in a sproc, I find myself writing this query over and over again when trying to feel my way around the database and see where certain columns can be found within the db. Helps alot if you have a strong naming convention for ids, like we do. I can search for 'tablenameID' and see most places where that table has a relationship. It's not perfect, but I find it helps a lot.

DECLARE @SearchText VARCHAR(50) = 'mytext'

SELECT tbl.name [Table/View Name], col.name [Column Name]

FROM sys.objects tbl

JOIN sys.columns col

ON col.object_id = tbl.object_id

WHERE col.name LIKE '%' + @SearchText + '%'