Bạn chỉ cần thêm mệnh đề GROUP BY, như sau:
SELECT
read_pub_id,
read_artc_id,
count(read_artc_id) as times_read
FROM
reads_t
GROUP BY
read_pub_id,
read_artc_id;
:)
Bạn chỉ cần thêm mệnh đề GROUP BY, như sau:
SELECT
read_pub_id,
read_artc_id,
count(read_artc_id) as times_read
FROM
reads_t
GROUP BY
read_pub_id,
read_artc_id;
:)