Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT nombre
- FROM
- (SELECT COUNT(*) AS NUMEROAPERITIVOS, ID_BAR
- FROM
- (SELECT *
- FROM
- (SELECT B.ID , B.Nombre AS NombreBebida, T.Nombre AS NombreTipo FROM (Parranderos.BEBIDAS B INNER JOIN Parranderos.TIPO_BEBIDA T ON B.ID=T.ID)) Tipos INNER JOIN PARRANDEROS.sirven S ON Tipos.ID=S.ID_BEBIDA)Toda
- WHERE Toda.HORARIO = 'diurno' AND Toda.NOMBRETIPO='aperitivo'
- GROUP BY Toda.ID_BAR)num_aperitivos
- INNER JOIN Parranderos.Bares X ON num_aperitivos.ID_BAR =X.ID
- WHERE PRESUPUESTO='Alto' AND NUMEROAPERITIVOS BETWEEN 3 AND 7
- ORDER BY numeroaperitivos, nombre
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement