Justine
banner
okumujustine.bsky.social
Justine
@okumujustine.bsky.social
Software & Data Engineer
🚀 Using ARRAY_AGG and JSON_BUILD_OBJECT in PostgreSQL.

ARRAY_AGG: aggregates rows into a single array.

In this example, we get all product groups with their respective arrays of products ( each of the products is in a JSON format).

#dataengineering #sql #mysql #postgresql
November 28, 2024 at 2:27 AM
🚀 SQL Tip: Creating a new table from an existing table

In this case, we are creating a duplicate of the department table while ignoring its contents.

#dataengineering #sql #mysql #postgresql #dataanalytics
November 26, 2024 at 11:48 PM
🚀 Using Generated Columns in PostgreSQL 🚀

A generated column is a column with values calculated from other columns.

The example below calculates an order's discounted price from the order's total price.

#sql #dataengineering #dataanalytics #datascience
November 26, 2024 at 10:05 PM