I am supposed to rewrite a SQL-query without using a subquery.
My solution which uses a subquery is:
SELECT * from parts WHERE weight >
(SELECT weight from parts WHERE name = 'tape-drive');
A simplified version of my table ‘parts’:
NAME WEIGHT
----------------------
line-printer 520
tape-drive 100
line-printer 520
tape-drive 100
byte-soap 75
card-punch 120
I’ve thought about it for quite some time and am unable to figure it out.
Answering, because it’s not often that I can;