sql - How to give alias to results returned after inner join in mySQL -


i need correlated sql query , purpose need provide alias outer query in perform inner join. not able alias

    select distinct(name)       person      inner join m_director dira      on (dira.pid = m_director.pid) dira      9 > (          select count(mid) m_director name = dira.name     ) ; 

i didn't understand want do, guess

select      distinct p.name,     count(d.mid) cnt      hindi2_person p inner join      hindi2_m_director d on      p.pid = d.pid group     p.name having count(d.mid) > 9 ; 

would want


Comments

Popular posts from this blog

php - Magento - Deleted Base url key -

javascript - Tooltipster plugin not firing jquery function when button or any click even occur -

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -