SELECT * from (SELECT max(num) as num,title FROM wb_rank WHERE time >= '2021-01-01 00:00:00' GROUP BY title) df ORDER BY num desc
SELECT
a.id
FROM
v9_download a
WHERE
NOT EXISTS ( SELECT * FROM v9_download_data b WHERE b.id = a.id );
CREATE USER 'username' @'%' IDENTIFIED BY 'password';
SHOW GRANTS FOR 'question' @'%';
为harrison提供db1数据库的table1表SELECT(查询)、INSERT(新增)、UPDATE(修改)权限
GRANT
SELECT,
INSERT,
UPDATE ON db1.table1 TO "harrison" @'%';
GRANT ALL PRIVILEGES ON db1.* TO "username" @'%';