2:SELECT SUM(总藏书量)/count(总藏书量),SUM(管内剩余)/count(管内剩余) FROM `藏书信息` GROUP BY 入库时间
这个我试了一下,结果能输出你想要的结果,只是得php,foreach返回的数据组合成你想要的数组
SELECT hotelid, roomtype, count( roomtype ) AS n
FROM `test`
WHERE 1
GROUP BY hotelid, roomtype
LIMIT 0 , 30
SELECT count( * ) , left( creattime, 7 ) AS left7timeFROM register
WHERE `creattime` LIKE '2012%'
GROUP BY lefttime
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)