What you need to know to create the query?

Hello! Is the SQL code:

create table D_TEST ( id number(17), numb number(10) ) 
alter table D_TEST 
PK_D_TEST add constraint primary key (ID); 
alter table D_TEST 
UK_D_TEST_N add constraint unique (NUMB);


I need a single query to loose a minimum (absent) number (NUMB), but not less than the minimum employed (existing) rooms. If there is no record in the table, the query should return a value of 1.

Tell me what theory you need to read to solve this problem?
April 18th 20 at 12:54
2 answers
April 18th 20 at 12:56
Something sql and DBMS. Krenke, Garcia-Molina, Ullman
April 18th 20 at 12:58
The SQL language and particular dialect required DBMS [in particular, window functions]

Find more questions by tags SQL