LISTING 2: Recreate Subqueries as Self-Referencing Join select 'MattressPrice' = Price, 'MattressMsrp' = Msrp, RailIDN, 'RailPrice' = (select one.Price from Items one inner join Items two on one.IDN = two.RailIDN and two.IDN = @IDN), 'RailMsrp' = (select one.Msrp from Items one inner join Items two on one.IDN = two.RailIDN and two.IDN = @IDN), BoxspringIDN, 'BoxspringPrice' = (select one.Price from Items one inner join Items two on one.IDN = two.BoxspringIDN and two.IDN = @IDN), 'BoxspringMsrp' = (select one.Msrp from Items one inner join Items two on one.IDN = two.BoxspringIDN and two.IDN = @IDN), 'Name' = ItemName from Items where IDN = @IDN