doubt in query - mysql -
i trying query
select round( avg( datediff( current_date, age ) /365 ) , 1 ) single_user u inner join university_has_single_user t on t.single_user_users_id_user = u.users_id_user ( select id_university university university = "isel" ) limit 0 , 30 the output 26.8 there problem because if change name of university or remove clause result 26.8 again.
the dates are:
1979-06-23 1988-04-23 1988-04-23. any help? problem?
where ( select id_university university university = "isel" ) should be
where exists ( select id_university university x x.university = "isel" , x.universityid = t.universityid ) well, guess. it's not clear me wat table structure is, , you're trying achieve, seems me want number given university, passing name query.
if i'm wrong there, please post table structure , actual goal.
Comments
Post a Comment