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.
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
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](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F6800bd59-d6cc-4971-bc53-b2b9a272acf9%2F6fa56593-d95c-4b12-8d54-f3256c63a87d%2Fc66np8c_processed.png&w=3840&q=75)
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](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F6800bd59-d6cc-4971-bc53-b2b9a272acf9%2F6fa56593-d95c-4b12-8d54-f3256c63a87d%2Fxu48of6_processed.png&w=3840&q=75)
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
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
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.Recommended textbooks for you
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
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)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
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)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education