I have many queries in SQL server which I have problem to solve them please help me to solve them, and I try to write most of the queries by nested queries if it is possible.
1: displaying The customer name and the bank_branch number that customer has received loan from that branch.
2:displaying pair name of customers that received equal amount loan.
3:displaying customer names that have received more than 2 loan .
4: displaying the customer names that their loan's amount is/are more than their account's balance.
5: displaying the number and address of bank_branches which has/have given loan for all of their customers.
6: displaying name and address of banks which all of their branches have given more than 10 loan's for their customers.
7:displaying pair name customers whose phone number start with '383'.
this is my E/R SCHEMA.


Dipankar BiswasRank #992 · 2K reputationPosted May 16, 2015, 2:13 AM EDT
Check this link.. to help..https://msdn.microsoft.com/en-us/library/ms187731.aspx
http://www.codeproject.com/Articles/300785/Calculating-simple-running-totals-in-SQL-Server
https://msdn.microsoft.com/en-us/library/ms179859.aspx
https://msdn.microsoft.com/en-IN/library/ms181567.aspx
Pankaj Kumar ChoudharyRank #80 · 24.4K reputationPosted May 16, 2015, 3:47 AM EDT
Please Post this image ....
Really i want to solve these problem.............
Dipankar BiswasRank #992 · 2K reputationPosted May 16, 2015, 12:34 PM EDT
my simple try for u.. by using single table.
Dipankar BiswasRank #992 · 2K reputationPosted May 16, 2015, 11:24 PM EDT
I'll try..
Dipankar BiswasRank #992 · 2K reputationPosted May 17, 2015, 9:24 PM EDT
Dipankar BiswasRank #992 · 2K reputationPosted May 18, 2015, 8:01 AM EDT
Joe WilsonRank #631 · 3.8K reputationPosted May 16, 2015, 10:42 AM EDT
Well I think this one is complete so please guide me to solve them
Joe WilsonRank #631 · 3.8K reputationPosted May 16, 2015, 9:23 PM EDT
Joe WilsonRank #631 · 3.8K reputationPosted May 17, 2015, 6:20 PM EDT
Joe WilsonRank #631 · 3.8K reputationPosted May 18, 2015, 6:28 AM EDT
Joe WilsonRank #631 · 3.8K reputationPosted May 18, 2015, 8:07 AM EDT