Receive and Verify
Part of the SQL Foundations section of Coddy's PostgreSQL journey. Lesson 20 of 22.
Challenge
MediumAdd three units to stock for product id 1, then return id, name and stock for all travel products. The update and final query are separate statements. Order the final result by id.
The input tables are shown in the test panel. Each run starts from fresh data. Return the named columns in the stated order; do not hard-code the displayed rows.
Try it yourself
-- Write your SQL here.
All lessons in SQL Foundations
1Types and Casts
Convert with CastsExact Decimal DivisionBoolean ValuesCreate a Typed TableActive Price Review4Change Data Safely
Insert and ReturnUpdate Selected RowsDelete and ReturnTry Changes in a TransactionReceive and VerifyPractice on your own: PostgreSQL playground