Please help in below SQL server queries :
The database consists of the following tables:
consists of the following tables:
PLAYER (PlayerNo, Name, Birth_Date, Age,Street_Address, Town, Phone, TeamNo).
MATCH (MatchNo, TeamNo, PlayerNo)
PAYMENT (PaymentNo, PlayerNo, Payment_Date, Amount).
CONTRACT (PlayerNo, Begin_Date, End_Date, Position).
Assumption: A player has only one contract with the team and plays for only one team. Player's contract is not renewed once ended.
Using SQL and TransSQL, please help with the following :
(a) The maximum and minimum payment amount of players.
(b) Get the player number and name of players who are less than 30 years old and who live in Manchester. The names should be displayed in alphabetical order.
(c) The number of wins of each team for each division
(d) A procedure "getTotalAmountPaid" which calculates the total amount paid to a player. The procedure takes as input the payment number and displays the player number, player name and total amount paid. For example, assume that the total amount paid for player No10 is £1000000, the procedure should display the following:
"Total Amount paid for Player 10 is £1000000"
(e) A table-valued function "getPlayer" that returns the player number,player name, team number, division, date contract began,date it ended and position of the player. The function takes as input the player number.
Recently Asked Questions
- The student_scores function takes a registrar database dict argument and returns a dictionary of dictionaries. The key in the outer-dictionary is a student's
- The read_db function takes an open-file as an argument; it returns a dictionary (you may return a dict or defaultdict, which print differently but compare for
- Complete the first step of program design that is Analyze the Problem. Description Bob Smith owns a small car rental service named Clunker Rentals that