IBM INTERVIEW QUESTION | Return companies with high profits

 DROP TABLE IF EXISTS Company;


CREATE TABLE Company (

    id INT PRIMARY KEY,

    name VARCHAR(255)

);


INSERT INTO Company (id, name) VALUES

(1, 'Alpha Corp'),

(2, 'Beta LLC'),

(3, 'Gamma Inc'),

(4, 'Delta Ltd'),

(5, 'Epsilon Plc'),

(6, 'Zeta GmbH'),

(7, 'Eta SA'),

(8, 'Theta Srl'),

(9, 'Iota Partners'),

(10, 'Kappa Co');


DROP TABLE IF EXISTS Sales;


CREATE TABLE Sales (

    company_id INT,

    expenses INT,

    revenue INT 

);


Comments

Popular posts from this blog

50 Essential SQL Questions to Land Your Dream Job

How to find all the customers who placed orders on three consecutive days | SQL Scenario questions

ACCENTURE SQL INTERVIEW QUESTION | Change the ProductIDs