SELECT `t3`.`id_member`, `t3`.`month`, `t3`.`count`
FROM (
SELECT `month`, MAX(`count`) AS `maxcount`
FROM (
SELECT DATE_FORMAT(FROM_UNIXTIME(`poster_time`),'%Y-%m') AS `month`,
COUNT(*) AS `count`
FROM `messages`
GROUP BY `id_member`, `month`
) AS `t1`
GROUP BY `month`
) AS `t2`
JOIN (
SELECT DATE_FORMAT(FROM_UNIXTIME(`poster_time`),'%Y-%m') AS `month`,
COUNT(*) AS `count`, `id_member`
FROM `messages`
GROUP BY `id_member`, `month`
) AS `t3` ON `t3`.`month` = `t2`.`month`
AND `t3`.`count` = `t2`.`maxcount`
ORDER BY `t3`.`month`
<div class="line">
<div class="cont">Йо, какой-то блок</div>
<div class="cont-line"><div></div></div>
<div class="cont">Йо, какой-то блок</div>
</div>
.line {
display: table;
width: 100%;
}
.cont {
vertical-align: middle;
display: table-cell;
white-space: nowrap;
width: 1%;
}
.cont-line {
vertical-align: middle;
display: table-cell;
padding: 0 10px;
}
.cont-line div {
height: 2px;
background: #000;
}
GET https://spreadsheets.google.com/feeds/cells/key/worksheetId/private/full?min-row=2&min-col=4&max-col=4
set @curday := DAYNAME(CURDATE());
SELECT id, name, `time`, description FROM daily
WHERE
day = @curday
or day = 'all'
or (@curday in ('Sunday','Saturday') and day = 'weekend' )
or (@curday not in ('Sunday','Saturday') and day = 'workday' )