Skip to content

Tag: sql

‘SET’ must be a type

I created the following types : A person can have a set of PhoneNumbers, when I try to create the Type Person : I get the following error : Errors: TYPE PERSON Line/Col: 0/0 PL/SQL: Compilation unit analysis terminated Line/Col: 1/90 PLS-00488: ‘SET’ must be a type Answer If you want an array of p…

Two conditions based on subquery. How to shorten it?

I have working query basing on 2 subqueries. I would like to know what to do to do not have to paste 2 times my big sql query and just use this two conditions in one line? Is this possible? Answer I am guessing that you really want: Unlike your query, this guarantees that the two columns are on the

How to get list of cars with a specific ID of wheel?

I have the following code snippet : I want to get the Voitures having number of Roue = 554 : What is the difference of using the table in the EXISTS subquery directly in the WHERE clause? Answer The right way to write your first query would be: This query, written this way, is doubtfully usefull, because it s…

cumulative improvement score

I have ne table of student score date college_id challenge_id student_id score 2020-10-01 C11219 CH10101 S1000 80 2020-10-01 C11219 CH10101 S1001 55 2020-10-02 C11219 CH10102 S1000 87 2020-10-02 C11219 CH10102 S1001 42 2020-10-03 C11219 CH10103 S1000 95 2020-10-03 C11219 CH10103 S1001 50 2020-10-01 C11220 CH1…