There is a sample from a database, which is the JOIN of two different tables, these two tables is COUNT().
The fact that both of these count for some reason have absolutely the same value.
COUNT(`r`.`id`) AS `rcnt`,
COUNT(`f`.`id`) AS `fcnt`
`table` AS `t`
`rtable` AS `r` ON `t`.`id` = `r`.`r_id`
`ftable` AS `f` ON `f`.`w_id` = `t`.`w_id`
(changed the field names, hence may be not the right query, but the point should be clear)
Then fcnt and rcnt are the same value for some reason.
Maybe someone knows why and how to avoid it?