A Simple Beginner’s Problem from a Swedish Student

A Simple Beginner’s Problem from a Swedish Student

Facts: Employee(name,salary,boss,department)

Question: Which employees earn more than their boss ?

Please make sure you don’t share the results with your boss! : )

Try the following:

use pubsgocreate table myemployee( name char(30),  salary int,  boss char(30),  department char(15),  constraint pk_employee primary key(name)) goinsert into myemployee (name,salary,boss,department)values ('FRANK',50000,'FRANK','ACCOUNTING')insert into myemployee (name,salary,boss,department)values ('JIM',40000,'FRANK','ACCOUNTING')insert into myemployee (name,salary,boss,department)values ('JOE',70000,'FRANK','ACCOUNTING')insert into myemployee (name,salary,boss,department)values ('HARRY',80000,'HARRY','MIS')insert into myemployee (name,salary,boss,department)values ('TIM',45000,'HARRY','MIS')insert into myemployee (name,salary,boss,department)values ('TOM',90000,'HARRY','MIS')select e.name as 'Employee', e.salary as 'Employee Salary', boss.name as 'Boss',    boss.salary as 'Boss Salary'from myemployee e, myemployee bosswheree.boss = boss.name ande.salary > boss.salary

Share the Post:
Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular

XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across

AI innovation

Companies Leading AI Innovation in 2023

Artificial intelligence (AI) has been transforming industries and revolutionizing business operations. AI’s potential to enhance efficiency and productivity has become crucial to many businesses. As we move into 2023, several

data fivetran pricing

Fivetran Pricing Explained

One of the biggest trends of the 21st century is the massive surge in analytics. Analytics is the process of utilizing data to drive future decision-making. With so much of