mysql - subquery returns more than one row error -


okay, there are.. number.. of questions on same title, couldn't think of how more specific.

the reason confusing me returning more 1 row desired effect of (one of) sub queries

select max(thecount)     (select fk_hour, count(fk_hour) thecount          (select fk_hour          slottime          inner join time on slottime.fk_hour = time.hour          fk_hour =              (select time.hour time time.day=0 )         ) c          group fk_hour     ) counts; 

i realise time reserved word mysql - have rectify soon; though doubt problem in case.

the aim of query select maximum count of instances of particular hours day = 0.

mysql phpmyadmin designer

the problem clearly:

    fk_hour = (select time.hour time time.day=0 ) 

the simplest solution change = in:

    fk_hour in (select time.hour time time.day=0 ) 

however, might want check data determine if intend.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -