question

Rajit avatar image
Rajit asked

Sql questions and please give full explanation

Consider the following relational schema, representing five relations describing shopping transactions and information about credit cards generating them [the used notation is explained above].


SHOPPINGTRANSACTION (Transld, Date, Amount, Currency, Exchange Rate, CardNbrCREDITCARD, StoreldSTORE)


CREDITCARD (CardNbr, CardType CARDTYPE, CardOwnerOWNER, ExpDate, Limit) OWNER (Ownerld, Name, Surname, Birth Date, Job, IncomeLevel, Level) CARDTYPE (CardType, Circuit, Issuer, Address, Country, CardName, Color) STORE (Storeld, Name, Address, Country, Zone, Web, Email, Type)


1) Answer the following questions considering the domain described by the previous relational schema: 1.1. How many transactions can occur in each store? (provide the minimum and the maximum number) 1.2. How many credit cards with the same owner and the same type can exist? (provide the minimum and the maximum number)


2) Write the SQL query representing the following request:


2.1. Determine the number and the expire date of the credit cards with a limit equal to 2.000, that have not generated any transaction in 2022.

homeworksqlquery
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Jeff Moden avatar image Jeff Moden commented ·

I don't mind helping folks that have made a good, honest try at trying to solve the problems.

0 Likes 0 ·

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.