3

Missing in SQL Problem

 2 years ago
source link: https://www.codeabbey.com/index/forum_topic/6c2a3e8720d5f9c0b7f7327b66ef4fb9
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Missing in SQL Problem

Back to General discussions forum

LukasDev     2022-07-24 08:37:18

Dear all, i am trying to solve missing in SQL and i suspect to have the right answer yet the entry is deemed wrong every time.

I have this data:

create table package (pkg_id int, sender text, weight int, trackcode text);  
create table attempt (att_id int, pkg_id int, provider text);  
create table event (evt_id int, att_id int, status text);  
insert into package values (127, 'ann', 582, 'tm2567124');  
insert into attempt values (813, 127, 'bl');  
insert into event values (4160, 813, 'created');  
insert into attempt values (828, 127, 'rps');  
insert into event values (4236, 828, 'created');  
insert into event values (4414, 828, 'picked up');  
insert into event values (4499, 828, 'left at door');  
insert into package values (134, 'eve', 420, 'jn8373625');  
insert into attempt values (841, 134, 'capost');  
insert into package values (140, 'eve', 350, 'es8453740');  
insert into attempt values (863, 140, 'dhl');  
insert into event values (4581, 863, 'created');  
insert into package values (146, 'frank', 730, 'b47976245');  
insert into package values (151, 'bob', 420, 'on8645327');  
insert into attempt values (882, 151, 'capost');  
insert into event values (4691, 882, 'created');  
insert into event values (4847, 882, 'at airport');  

And the right answer i presume would be: es8453740

This seems to work for all entries even the test entries when is copy them in my SQL sandbox. Yet it keeps telling me that i get it wrong. What is the style if answer expected? Is it only the trackcode or did i get the idea completely wrong and another entry is expected.

Thanks for your help in advance, Best regards,

Lukas


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK