For this exercise use the following schema, the script to create this schema and populate data is given in ATM.SQL file. 1- List all names of the users from Lahore in Descending Order. 2- List all cards, who have card type “Credit” in ascending order. 3- List the name of all the users who are Gold type. 4- List the names of the user who’s Card number ends with 6. (HINT: USE LIKE)

Enhanced Discovering Computers 2017 (Shelly Cashman Series) (MindTap Course List)
1st Edition
ISBN:9781305657458
Author:Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Publisher:Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Chapter7: Input And Output: Extending Capabilities Of Computers And Mobile Devices
Section: Chapter Questions
Problem 21SG
icon
Related questions
Question

For this exercise use the following schema, the script to create this schema and populate data is given in ATM.SQL file.

1- List all names of the users from Lahore in Descending Order.
2- List all cards, who have card type “Credit” in ascending order.
3- List the name of all the users who are Gold type.
4- List the names of the user who’s Card number ends with 6. (HINT: USE LIKE)

user TypelD
name
1
Silver
2
Gold
3
Bronze
4
4
Common
userld
user Type phoneNum
city
name
Ali
2
03036067000 Narowal
2
2
Ahmed
1
03036047000 Lahore
3
Аgeel
3
03036063000 Karachi
4
4
Usman 4
03036062000 Sialkot
5
5
Hafeez 2
03036061000 Lahore
userlD
cardNum
1
1324327436569
1
2343243253436
2
2324325423336
2343243253436
3
2324325436566
6
2324325423336
cardNum
card TypelD PIN
expire Date balance
1
1324327436569 3
1770 2022-07-01 43025.31
2
2324325423336
3
0234 2020-03-02 14425.62
3
2324325436566
1
1234 2019-02-06 34325.52
4
2324325666456 2
1200 2021-02-05 24325.3
2343243253436 2
0034 2020-09-02 34025.12
card TypelD
name description
1
1
Debit Spend Now, Pay Now
Credit Spend Now, Pay later
3
Gift
Enjoy
transld transDate
cardNum
amount trans Type
1
1
2017-02-02 1324327436569
500
1
2
2018-02-03 2343243253436
3000
3
3
3
2017-05-06 2324325436566 2500
2
4
4
2016-09-09 2324325436566 2000
1
5
2015-02-10 2324325423336 6000
4
trans TypelD typeName description
1
1
Withdraw NULL
2
Deposit
NULL
3
Schedul. NULL
4
Failed
NULL
234
N3
Transcribed Image Text:user TypelD name 1 Silver 2 Gold 3 Bronze 4 4 Common userld user Type phoneNum city name Ali 2 03036067000 Narowal 2 2 Ahmed 1 03036047000 Lahore 3 Аgeel 3 03036063000 Karachi 4 4 Usman 4 03036062000 Sialkot 5 5 Hafeez 2 03036061000 Lahore userlD cardNum 1 1324327436569 1 2343243253436 2 2324325423336 2343243253436 3 2324325436566 6 2324325423336 cardNum card TypelD PIN expire Date balance 1 1324327436569 3 1770 2022-07-01 43025.31 2 2324325423336 3 0234 2020-03-02 14425.62 3 2324325436566 1 1234 2019-02-06 34325.52 4 2324325666456 2 1200 2021-02-05 24325.3 2343243253436 2 0034 2020-09-02 34025.12 card TypelD name description 1 1 Debit Spend Now, Pay Now Credit Spend Now, Pay later 3 Gift Enjoy transld transDate cardNum amount trans Type 1 1 2017-02-02 1324327436569 500 1 2 2018-02-03 2343243253436 3000 3 3 3 2017-05-06 2324325436566 2500 2 4 4 2016-09-09 2324325436566 2000 1 5 2015-02-10 2324325423336 6000 4 trans TypelD typeName description 1 1 Withdraw NULL 2 Deposit NULL 3 Schedul. NULL 4 Failed NULL 234 N3
User
UserCard
* USER_ID
* UserlD
* CardNum
Name
UserType
Transaction
* Trans_ID
phone_Num
City
TransDate
CardNum
Amount
Card
Trans type
* CardNum
CardTypelD
PIN
UserType
* UserTypelD
ExpireDate
balance
Name
TransactionType
8 Trans_Type ID
TypeName
CardType
8 CardTypelD
Description
Name
Description
Transcribed Image Text:User UserCard * USER_ID * UserlD * CardNum Name UserType Transaction * Trans_ID phone_Num City TransDate CardNum Amount Card Trans type * CardNum CardTypelD PIN UserType * UserTypelD ExpireDate balance Name TransactionType 8 Trans_Type ID TypeName CardType 8 CardTypelD Description Name Description
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
SQL Functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Enhanced Discovering Computers 2017 (Shelly Cashm…
Enhanced Discovering Computers 2017 (Shelly Cashm…
Computer Science
ISBN:
9781305657458
Author:
Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Publisher:
Cengage Learning
Fundamentals of Information Systems
Fundamentals of Information Systems
Computer Science
ISBN:
9781305082168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage