mysql select from table a where condition x and subselect -
i want count amount of registries in table specific amount of time determined @ table b.
i looking proper way of this:
select count(*) total table_a a.created >= '0000-00-00 00:00:00' , a.created <= (select table_b.end table_b.id = 13)
basically, table_b consists of 3 columns: int primary key named 'id', datetime named 'start', , other datetime named 'end'. way have identified weeks of current year.
just in case need that, proper way that:
select count(*) total table_a a.created >= '0000-00-00 00:00:00' , a.created <= (select table_b.`end` table_b table_b.`id`=13)
Comments
Post a Comment