-4
테이블 트랜잭션 : business_key = CUSTOMER_IDSQL : 입력에 따라 값을 도출
customer_id|product_type|amount ------------------------------- cus1 | shoes | 100 cus1 | shoes | 50 cus1 | clothes | 100 cus2 | clothes | 500 cus2 |clothes | 21
테이블 transactionsbycustomer : business_key = CUSTOMER_ID + 제품 _ I가 transactionsbycustomer '에 양 값을 도출해야
customer_id|product_type|amount ------------------------------- cus1 |shoes |150 cus1 |clothes | 50 cus2 |clothes |521
'SQL을 사용하는 테이블? 도와주세요!
다음과 같은 의미가 있습니다. 'SELECT amount FROM transactionsbycustomer WHERE customer_id = "cus1"';; 무엇이 특별히 필요한가요? – JiFus
샘플 데이터를 기반으로 예상 출력의 예를 추가하십시오. –
당신은'GROUP BY' 절을 생각하고 있습니다. – mustaccio