PostgreSQL
Basics
How to InsertHow to UpdateHow to DeleteHow to Trim StringsHow to Use substring()How to Use substring() with RegEx to Extract a StringHow to Replace SubstringsHow to Modify ArraysHow to Compare ArraysHow to Concatenate StringsHow to Convert the Case of a StringHow to Create an ArrayHow to Insert Data Into an ArrayHow to Query ArraysHow to Use string_agg()
Database Management
How to Create a TableHow to Drop a TableHow to Rename a TableHow to Truncate a TableHow to Duplicate a TableHow to Add a ColumnHow to Change a Column NameHow to Add a Default ValueHow to Remove a Default Value From a ColumnHow to Add a Not Null ConstraintHow to Remove a Not Null ConstraintHow to Add an IndexHow to Drop an IndexHow to Create a ViewHow to Drop a ViewHow to Reset SequenceHow to drop a column
Dates and Times
Analysis
How to Use nullif()How to Use Lateral JoinsHow to Calculate PercentilesHow to Get the First Row per GroupHow to Use generate_series to Avoid Gaps In DataHow to Do Type CastingHow to Write a Common Table ExpressionHow to Import a CSV using CopyHow to Compare Two Values When One Is NullHow to Use CoalesceHow to Write a Case StatementHow to Use Filter to Have Multiple CountsHow to Calculate Cumulative Sum-Running TotalHow to Query a JSON Column
Finally, a unified workspace for your SQL development
Get more done, together, with PopSQL and PostgreSQL