SqlSnippets's profile picture. SQL lovers sharing loveable SQL every day of the year.
Submit your snippets: http://sql-snippets.count.co
Tag us to share snippets to feature!

Daily SQL Snippets

@SqlSnippets

SQL lovers sharing loveable SQL every day of the year. Submit your snippets: http://sql-snippets.count.co Tag us to share snippets to feature!

What I learned from this snippet: 1 - some years have 53 weeks (2022 👀) 2 - and that really messes up fiscal calendar calculations 3 - but, with a clever bit of code, it can be fixed! sql-snippets.count.co/t/advanced-dat…

SqlSnippets's tweet image. What I learned from this snippet:
1 - some years have 53 weeks (2022 👀)
2 - and that really messes up fiscal calendar calculations
3 - but, with a clever bit of code, it can be fixed!

sql-snippets.count.co/t/advanced-dat…

Did you know #Snowflake has extensive support for manipulation of JSON strings? Check out an interactive example which demonstrates parsing and accessing fields here: sql-snippets.count.co/t/parse-json/2…

SqlSnippets's tweet image. Did you know #Snowflake has extensive support for manipulation of JSON strings? Check out an interactive example which demonstrates parsing and accessing fields here:

sql-snippets.count.co/t/parse-json/2…

Handling dates in #BigQuery? You'll want to see this pair of snippets from user stretch for creating views packed with useful date dimensions: sql-snippets.count.co/t/basic-date-d… sql-snippets.count.co/t/advanced-dat…

SqlSnippets's tweet image. Handling dates in #BigQuery? You'll want to see this pair of snippets from user stretch for creating views packed with useful date dimensions:

sql-snippets.count.co/t/basic-date-d…

sql-snippets.count.co/t/advanced-dat…

Daily SQL Snippets 已转帖

SQL Snippets-Crowdsourcing SQL Queries "A curated collection of helpful and reusable SQL snippets" #SQL #Database #Postgresql #SQLServer cutt.ly/JQ9SViR @SqlSnippets @tbrownlow3 @databasestar @WebOpsDaily @PostgresWeekly @SQLShack @CuratedSQL @FriedholdMatz @DatabaseDaily

nikosvg's tweet image. SQL Snippets-Crowdsourcing SQL Queries
"A curated collection of helpful and reusable SQL snippets"
#SQL #Database #Postgresql #SQLServer
cutt.ly/JQ9SViR
@SqlSnippets @tbrownlow3 @databasestar @WebOpsDaily @PostgresWeekly @SQLShack @CuratedSQL @FriedholdMatz @DatabaseDaily

This #SQLServer snippet isn't just a snippet...it's also a great refresher on the theory behind compound growth rates 🧠 📈 Learn how to model them in SQL: sql-snippets.count.co/t/compound-gro… #SQL

SqlSnippets's tweet image. This #SQLServer snippet isn't just a snippet...it's also a great refresher on the theory behind compound growth rates 🧠 📈

Learn how to model them in SQL:
sql-snippets.count.co/t/compound-gro…
#SQL

Anyone else always forgetting the syntax for formatting your dates? This #BigQuery Date and Time formatting cheat sheet snips the most common formatting strings for quick access next time you need them 🙌 sql-snippets.count.co/t/formatting-d… #SQL

SqlSnippets's tweet image. Anyone else always forgetting the syntax for formatting your dates? 

This #BigQuery Date and Time formatting cheat sheet snips the most common formatting strings for quick access next time you need them 🙌

sql-snippets.count.co/t/formatting-d…
#SQL

Missing the "remove duplicates" button from Excel? Use this snippet to drop duplicate rows in @PostgreSQL & start your analysis off on the right foot sql-snippets.count.co/t/removing-dup… #SQL @planetpostgres

SqlSnippets's tweet image. Missing the "remove duplicates" button from Excel? 
Use this snippet to drop duplicate rows in @PostgreSQL & start your analysis off on the right foot

sql-snippets.count.co/t/removing-dup…

#SQL @planetpostgres

Learn how to use #bigquery array and hash functions to generate uniform random data with this clever snippet! sql-snippets.count.co/t/generate-uni… #SQL

SqlSnippets's tweet image. Learn how to use #bigquery array and hash functions to generate uniform random data with this clever snippet! 

sql-snippets.count.co/t/generate-uni…
#SQL

Turn a stringified array of values into a nice, tidy column using @PostgreSQL 's REGEX_SPLIT_TO_TABLE function sql-snippets.count.co/t/split-column… #SQL

SqlSnippets's tweet image. Turn a stringified array of values into a nice, tidy column using @PostgreSQL 's REGEX_SPLIT_TO_TABLE function

sql-snippets.count.co/t/split-column…
#SQL

Levenshtein distance is a great way to compare two strings but can be nearly impossible if your DB doesn't have a built-in function. Copy this snippet next time you want to try it out in @MySQL , or save it as a UDF for even quicker access! sql-snippets.count.co/t/levenshtein-… #SQL #NLP

SqlSnippets's tweet image. Levenshtein distance is a great way to compare two strings but can be nearly impossible if your DB doesn't have a built-in function. 
Copy this snippet next time you want to try it out in @MySQL , or save it as a UDF for even quicker access!
sql-snippets.count.co/t/levenshtein-…
#SQL #NLP

Learn how the RANK window function can help finding the first row in a group, using an example written for @SQLServer sql-snippets.count.co/t/find-the-fir…

SqlSnippets's tweet image. Learn how the RANK window function can help finding the first row in a group, using an example written for @SQLServer 

sql-snippets.count.co/t/find-the-fir…

Did you know @SnowflakeDB has a built-in function to help you parse a URL? This snippet shows us how to use PARSE_URL to transform a messy URL string into meaningful data (without regex!) sql-snippets.count.co/t/parse-url/79 #SQL #snowflake #DataScience

SqlSnippets's tweet image. Did you know @SnowflakeDB has a built-in function to help you parse a URL?
This snippet shows us how to use PARSE_URL to transform a messy URL string into meaningful data (without regex!)
sql-snippets.count.co/t/parse-url/79
#SQL #snowflake #DataScience

Many dialects have a LAST_DATE function to find the last day of a given month. This snippet helps us get that same functionality in #BigQuery 🙌 #SQL

SqlSnippets's tweet image. Many dialects have a LAST_DATE function to find the last day of a given month. This snippet helps us get that same functionality in #BigQuery 🙌
#SQL

Outlier detection isn't just for your stats class. This snippet shows 3 ways to identify outliers in #snowflake sql-snippets.count.co/t/outlier-dete… #SQL #DataScience #Stats #FridayFun


Does your regex knowledge disappear every time you need to use it? Bookmark this #Postgres snippet for the next time you need to parse URLs: sql-snippets.count.co/t/parse-url/10…

SqlSnippets's tweet image. Does your regex knowledge disappear every time you need to use it? 
Bookmark this #Postgres snippet for the next time you need to parse URLs: sql-snippets.count.co/t/parse-url/10…

See how to use analytic functions in #bigquery to do the classic but essential Year over Year % difference: sql-snippets.count.co/t/year-over-ye…

SqlSnippets's tweet image. See how to use analytic functions in #bigquery to do the classic but essential Year over Year % difference:
sql-snippets.count.co/t/year-over-ye…

Loading...

Something went wrong.


Something went wrong.