SQL Queries - Solution
SQL Queries - Solution
--This will display record by account=100001 Select Account,Description,Short_description,Balance from KudlerCOA Where Account=100001
SELECT Account, SUM(Balance) AS TotalBalance, Description, Short_Description, Balance FROM KudlerCOA WHERE (Account = 100001) GROUP BY Account, Description, Short_Description, Balance
SELECT Account, SUM(Balance) AS TotalBalance FROM KudlerCOA WHERE (Account = 100001) GROUP BY Account
-- This view will give the list of records where short_Description='Bank Account' Create View View2 As SELECT Account, Description, Short_Description, Balance FROM KudlerCOA WHERE (Short_Description = 'Bank Account')
-- This view will give the list of records where Balance greater than 10000 Create View View3 As SELECT Account, Description, Short_Description, Balance FROM KudlerCOA WHERE (Balance > 10000)
-- This view will calculate the sum of balance of all the account Create View View4 As SELECT Account, SUM(Balance) AS TotalBalance FROM KudlerCOA GROUP BY Account
--This view will show all the details like description, short description, and balance and Totalbalance of Account = 100001 Create View View5 As SELECT Account, SUM(Balance) AS TotalBalance, Description, Short_Description, Balance FROM KudlerCOA WHERE (Account = 100001) GROUP BY Account, Description, Short_Description, Balance
--This will display record by account=100001 Create View View6 As Select Account,Description,Short_description,Balance from KudlerCOA Where Account=100001