I have a table where i need to fetch a result using derived table .
Display the products which name starts with either ‘S’ or ‘W’ and
which belongs to Stationary and cost more than 300 Rs .
I have tried but i got multiple same column . is it correct or how to correct .
select * from
(
select * from tblProduct
where (P_name like 'S%' or P_name like 'W%')
) A
join
tblProduct t
on t.P_id=a.P_id
where a.P_family like '%Stationary%' and a.cost >300