0
0
Supabasecloud~10 mins

Supabase dashboard overview - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to select all rows from the 'users' table in Supabase.

Supabase
const { data, error } = await supabase.from('[1]').select('*');
Drag options to blanks, or click blank then click option'
Ausers
Bprofiles
Corders
Dproducts
Attempts:
3 left
💡 Hint
Common Mistakes
Using a table name that does not exist in the database.
Forgetting to put the table name as a string.
2fill in blank
medium

Complete the code to filter users where 'age' is greater than 18.

Supabase
const { data, error } = await supabase.from('users').select('*').[1]('age', 18);
Drag options to blanks, or click blank then click option'
Agte
Beq
Cgt
Dfilter
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'filter' which does not exist in Supabase JS client.
Using 'eq' which means equals, not greater than.
3fill in blank
hard

Fix the error in the code to insert a new user with name 'Alice' and age 30.

Supabase
const { data, error } = await supabase.from('users').[1]({ name: 'Alice', age: 30 });
Drag options to blanks, or click blank then click option'
Ainsert
Bupdate
Cselect
Ddelete
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'update' instead of 'insert' to add new data.
Using 'select' which only reads data.
4fill in blank
hard

Fill both blanks to update the 'age' of user with id 5 to 40.

Supabase
const { data, error } = await supabase.from('users').[1]({ age: 40 }).[2]('id', 5);
Drag options to blanks, or click blank then click option'
Aupdate
Binsert
Ceq
Dfilter
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'insert' instead of 'update' to modify data.
Using 'filter' instead of 'eq'.
5fill in blank
hard

Fill all three blanks to delete users older than 60.

Supabase
const { data, error } = await supabase.from('[1]').[2]().[3]('age', 60);
Drag options to blanks, or click blank then click option'
Ausers
Bfilter
Cgt
Ddelete
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'filter' instead of 'delete' and 'gt'.
Using 'gte' or 'eq' instead of 'gt' for the operator.