How can i fetch ID from multiple tag selected from database : [enter image description here][1]


  [1]: https://i.stack.imgur.com/euiSM.png



Actully i have 3 tables "mail" , "tags" , "tag_assigned"  


I am using filter query of multiple tag selected mail list. 

For ex: From the screenshot i need to fetch mailid from  this table where selected tags id "1" and  "2".

i want to return mail id 4 and 1 . how to get these ids from this table.

I need sql query for this...Someone help me please