Hi everyone! I am from Brazil and I would like to ask you for some help, if possible. Please, I need a solution about an SQL select statement. I have a database on mysql administrator. I am attaching an illustration with the entity relationship diagram of my database. I need to make a SQL Select query for it to produce the following result:
One table which returns the names of the projects of the employee who earns the smallest salary and the employee who earns the biggest salary.
One table which returns the total number of dependents of the employee who earns the smallest salary and the employee who earns the biggest salary.
I'm sorry if you don't understand my post, but English is not my first language and here in Brazil we don't have enough English lessons. Thank you very much for any answers!
People in this forum are busy and will not have time to do this ...( create sample data)
we want to directly work on the SQL part ...
We can also help you understand how to write SQL ..
Please post sample data ...for your questions
like this ...
drop table #sampledata
create table #sampledata
insert into #sampledata
('2019-09-05 12:02:55.533','b123 ','dfjk'),
('2019-09-03 12:02:55.533','b123 ','TV12'),
('2019-09-03 12:02:55.533','b123 ','uiop')
i tried to create the sample data
drop table dbo.project
create table dbo.project
drop table dbo.employee
create table dbo.employee
employee_id int ,
employee_salary int ,
insert into dbo.project select 1,'project_alpha'
insert into dbo.project select 2,'project_gamma'
insert into dbo.project select 3,'project_cleanup'
insert into dbo.employee select 2222,'har',1000,1,20
insert into dbo.employee select 3345,'pra',2000,2,44
insert into dbo.employee select 3333,'ok', 400 ,3,44
select * from dbo.project
select * from dbo.employee