For this exercise use the following schema, the script to create this schema and populate data is given in ATM.SQL file 1- List the Cities of the users who have balance between 20000 and 35000. 2- List the Users who have never used the Card for transaction. 3- List the Card numbers that will expire in year 2020. 4- List the names of the users who’s transaction had failed.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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 the Cities of the users who have balance between 20000 and 35000.
2- List the Users who have never used the Card for transaction.
3- List the Card numbers that will expire in year 2020.
4- List the names of the users who’s transaction had failed.

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
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
Expert Solution
steps

Step by step

Solved in 4 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
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education