sql문제

1874 단어 sqlsql

USERS 테이블과 TRANSACTIONS테이블 주어졌을 때,

SELECT A.USER_ID, IFNULL(COUNT(B.USER_ID), 0), IFNULL(SUM(B.MONEY), 0)
FROM USERS A
LEFT OUTER JOIN TRANSACTIONS B
ON A.USER_ID = B.USER_ID AND B.DATE_TIME BETWEEN '2020-09-01' AND '2020-09-08'
GROUP BY A.USER_ID
ORDER BY A.USER_ID ASC

좋은 웹페이지 즐겨찾기