I have a problem in merging two queries: a
SELECT f.attribute_name, s.value as htc
FROM attributes f
left join `car_type` c on f.type_id=c.id
left join mode m on m.id = f.mode_id
left join settings s on f.id=s.attr_id
where c.id=1 and f.mode_id = 1
While giving this query, I got the following output as in image
SELECT f.attribute_name, s.value as ct
FROM attributes f
left join `car_type` c on f.type_id=c.id
left join mode m on m.id = f.mode_id
left join settings s on f.id=s.attr_id
where c.id=2 and f.mode_id = 1
For the second query, I got the output as in image
I want to get the ct and htc values in the same row where the attribute name are same in both the queries.

