我已经问过并获得此查询:
SELECT (@rn := @rn + 1) as ranking, p.* FROM (SELECT player, COUNT(*) as cnt
FROM test
WHERE statistic=0 AND time > DATE_SUB(now(), INTERVAL 1 MONTH)
GROUP BY player
ORDER BY COUNT(*) desc
) p CROSS JOIN
(SELECT @rn := 0) params LIMIT 10;
但现在我想得到另一个价值:
COUNT(*) as cnt2 FROM test WHERE statistic=1 AND time > DATE_SUB(now(), INTERVAL 1 MONTH)
如何在上面的其他查询中插入查询,以获得" cnt2"? 谢谢
答案 0 :(得分:0)
编辑:,而不是AND子句
if [ `echo $LD_LIBRARY_PATH | grep 'libBigWig/include'` = '' ]
then
echo 'Not present..'
fi