Ad Code

Responsive Advertisement

Uri - Beecrowd | 2617 | Provider Ajax SA

beecrowd | 2617

Provider Ajax SA

Paulo R. Rodegheri BR Brazil


The financial sector has encountered some problems in the delivery of one of our providers, the delivery of the products does not match the invoice.

Your job is to display the name of the products and the name of the provider, for the products supplied by the provider 'Ajax SA'.

Schema

providers
Column Type
id (PK) numeric
name character varying (255)
street character varying (255)
city character varying (255)
state char (2)
 
products
Column Type
id (PK) numeric
name character varying (255)
amount numeric
price numeric
id_providers (FK) numeric

Tables

providers
id name street city state
1 Ajax SA Presidente Castelo Branco Porto Alegre RS
2 Sansul SA Av Brasil Rio de Janeiro RJ
3 South Chairs Av Moinho Santa Maria RS
4 Elon Electro Apolo São Paulo SP
5 Mike Electro Pedro da Cunha Curitiba PR
 
products
id name amount value id_providers
1 Blue Chair 30 300.00 5
2 Red Chair 50 2150.00 1
3 Disney Wardrobe 400 829.50 4
4 Blue Toaster 20 9.90 3
5 Solar Panel 30 3000.25 4

Output Sample

name name
Red Chair Ajax SA

N.B.: It's better if you solve this by your own. Thank you!


  URI - BEECROWD Online Judge 2617 Solve in SQL:                                          

-- Solved by Intesar
SELECT p1.name, p2.name
FROM products p1, providers p2
WHERE p2.id = p1.id_providers AND p2.name = 'Ajax SA';

Post a Comment

0 Comments

Ad Code

Responsive Advertisement