我想定义两个查询,但尽管有 mongoDB 示例,我真的不知道/理解如何做到这一点:
查询1:
SELECT COUNT(*), SUM(PKTS), SUM(BYTES) FROM mytable
查询2:
SELECT srcad, srcpo, dstad, dstpo, pro, COUNT(*), SUM(PKTS), SUM(BYTES) FROM mytable WHERE scrpo=80 OR dstpo=80 GROUP BY srcad, scrpo, dstad, dstpo, pro
问候