How to display parent record from the database which has a child record mysql?

There is a table called Questions with fields ( id, question, parent_id, type )
C recordings
id | question | parent_id | type
1 | first question parent ? | 0 | parent
2 | first child question ? | 1 | input
3 | second parent ques ? | 0 | parent
4 | second child question ? | 1 | input

How can I make the parent request from which is a subsidiary of
Sometimes the parent has no child queries questions and queries of these parent have to lead

Wrote a query which should display the first question(id = 1) as it has 2 subsidiary questions
select * from `questions` as `question` where `question`.`id` = `parent_id` // returns null

Wrote a query which should output the number
select count(*) from `questions` as `question` where `question`.`id` = `parent_id` // returns 0 should have been 2
March 12th 20 at 07:55
1 answer
March 12th 20 at 07:57
select a.id
questions from a
inner join questions b on a.id=b.parent_id
where a.type='parent' and b.type='input'

Find more questions by tags SQLMySQL