[英]How to create a table where one column contains a same value for all rows with different id?(See Layout for clarity)
[英]count rows for particular value from different table both table contains one same column?
Account(Acc_no, branch_name,balance)
Depositor(cust_name,Acc_no)
找到沒有。 每個分行的存款人數目?
SELECT A.branch_name, COUNT(D.cust_name) FROM Account A INNER JOIN Depositor D GROUP BY A.branch_name
希望這可以幫助
從ACCOUNT.ACC_NO = DEPOSITOR.ACC_NO GROUP BY BRANCH_NAME的ACCOUNT內部聯接存款人中選擇ACCOUNT.BRANCH_NAME,COUNT(DEPOSITOR.CUST_NAME);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.