From 4c9371ee7482e32b062554543d22870ca71f1d88 Mon Sep 17 00:00:00 2001 From: Matvey Volkov <83922413+Waljunye@users.noreply.github.com> Date: Tue, 12 Sep 2023 21:03:57 +0500 Subject: [PATCH] Fix issue in typescript (#3922) json_build_object is used to create json object and get it --- .../104-learn-sql-concepts/103-advanced-topics/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/roadmaps/postgresql-dba/content/104-learn-sql-concepts/103-advanced-topics/index.md b/src/data/roadmaps/postgresql-dba/content/104-learn-sql-concepts/103-advanced-topics/index.md index 66c044c0b..efa822cbb 100644 --- a/src/data/roadmaps/postgresql-dba/content/104-learn-sql-concepts/103-advanced-topics/index.md +++ b/src/data/roadmaps/postgresql-dba/content/104-learn-sql-concepts/103-advanced-topics/index.md @@ -55,7 +55,7 @@ This query retrieves the entire hierarchy of categories using a recursive CTE. PostgreSQL has support for JSON and JSONB data types. JSON functions enable you to create, manipulate, and query JSON data directly in your SQL queries. ```sql -SELECT json_object('name', name, 'age', age) as json_data +SELECT json_build_object('name', name, 'age', age) as json_data FROM users; ``` @@ -95,4 +95,4 @@ CREATE INDEX idx_users_city ON users (city); This command creates an index on the `city` column of the `users` table to speed up queries involving that column. -These advanced topics can help you become a highly skilled PostgreSQL user and tackle complex real-world problems effectively. As you become more comfortable with these advanced concepts, you will unleash the full power of SQL and PostgreSQL. \ No newline at end of file +These advanced topics can help you become a highly skilled PostgreSQL user and tackle complex real-world problems effectively. As you become more comfortable with these advanced concepts, you will unleash the full power of SQL and PostgreSQL.