Data:
- table shapes: shape_id, shape_name
- table shape_forms: shape_form_id, shape_id, shape_form
- shape_form can be: 0 – circle, 1 – square, 2 – triangle – the number of which for each shape is unlimited
I need 2 queries for selecting
- all shapes which contains in shape_forms both circles and triangles or only circles but not squares or only triangles
- all shapes which contains in shape_forms only triangles
Please, give me some hints for solving this task!
I’m restricted not to use “group by” for shape_forms but if there is no proper solution
1.
2.