这是我的表
CREATE TABLE IF NOT EXISTS `calls` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`date` timestamp NOT NULL,
`type` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB
并且有数据
现在我使用此查询获取当天的类型数据
SELECT user.name_first calls.date as days, (SELECT GROUP_CONCAT(type) FROM calls WHERE DAY(date) = DAY(days) ) FROM calls JOIN user ON user.user_id = calls.user_id WHERE calls.id IN (SELECT MAX(id) FROM calls GROUP BY DAY(calls.date))
正如我们所看到的那样calls.date as days
并尝试通过
(SELECT GROUP_CONCAT(type) FROM calls WHERE DAY(date) = DAY(days) )
它在mysql上的工作结果是mysql
但是当我在sqlite上试试它时说
没有这样的栏目:天(代码1):,同时编译
我读了sqlite支持别名