从表中选择col1和col1

时间:2014-03-17 20:44:40

标签: mysql

我正在尝试运行此MySQL查询:

SELECT SUM(arg2) as talktime FROM voipnow.ast_queue_log 
        WHERE queuename = '0536*401' 
        AND DATE(time) = '2014-03-17' 
        AND (event = 'COMPLETECALLER' AND event = 'COMPLETEAGENT') 
        ORDER BY time DESC

但没有返回结果,我也尝试过:

SELECT SUM(arg2) as talktime FROM voipnow.ast_queue_log 
        WHERE queuename = '0536*401' 
        AND DATE(time) = '2014-03-17' 
        AND event = 'COMPLETECALLER' AND event = 'COMPLETEAGENT')
        ORDER BY time DESC

但仍然没有结果

1 个答案:

答案 0 :(得分:1)

我想知道一个列如何同时拥有两个不同的字符串,也许您打算使用OR而不是AND来拥有COMPLETECALLER和{的所有记录{1}}

COMPLETEAGENT