Oh, I didn’t know a similar thing existed in osm2pgsql.
And yeah I am proposing a website or a tool over the existing osm website that makes this query easily. But, if a tool exists I am not sure of the requirement of the proposed project. What do you think?