SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
CREATE TABLE table1 ([account_number] int, [Amount] int) ; INSERT INTO table1 ([account_number], [Amount]) VALUES (13, 40), (14, 30), (14, 30), (13, 60), (14, 10) ; SELECT ( ( SELECT Sum(amount) FROM table1 WHERE account_number = 13 ) / ( SELECT Sum(amount) FROM ( (SELECT Sum(amount) FROM table1 WHERE account_number IN (13, 14) GROUP BY account_number) ) ) )
Stuck with a problem? Got Error? Ask ChatGPT!
Copy Clear