Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Challenge: Find Users by City | JSON Functions
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Functions in SQL

bookChallenge: Find Users by City

Завдання

Swipe to start coding

Write a query to find users whose address city in the profile_data JSONB column is 'New York' using PostgreSQL JSON operators.

  • Query the user_profiles table.
  • Use PostgreSQL JSON operators (-> and ->>) to access the nested city field inside the address object in the profile_data column.
  • Filter for rows where the address.city value is 'Springfield'.
  • Return the user_id and profile_data columns for all matching users.

Рішення

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 6. Розділ 3
single

single

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

Suggested prompts:

Can you explain this in simpler terms?

What are the main points I should remember?

Can you give me an example?

close

bookChallenge: Find Users by City

Свайпніть щоб показати меню

Завдання

Swipe to start coding

Write a query to find users whose address city in the profile_data JSONB column is 'New York' using PostgreSQL JSON operators.

  • Query the user_profiles table.
  • Use PostgreSQL JSON operators (-> and ->>) to access the nested city field inside the address object in the profile_data column.
  • Filter for rows where the address.city value is 'Springfield'.
  • Return the user_id and profile_data columns for all matching users.

Рішення

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 6. Розділ 3
single

single

some-alt