Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Oppiskele Challenge: Find Users by City | JSON Functions
Functions in SQL

bookChallenge: Find Users by City

Tehtävä

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.

Ratkaisu

Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 6. Luku 3
single

single

Kysy tekoälyä

expand

Kysy tekoälyä

ChatGPT

Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme

close

bookChallenge: Find Users by City

Pyyhkäise näyttääksesi valikon

Tehtävä

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.

Ratkaisu

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 6. Luku 3
single

single

some-alt