← prev | next →
Kev In 2021-03-16 15:53:39
It’s a drilling and blasting company…
piterden 2021-03-16 15:57:13
So describe it with as many details as you can
Kev In 2021-03-16 16:12:41
So, the company has a several depts .. i.e , Bs strategy, Finance , Store, HR, Architecture Design, Construction, Mechanical , Drilling,Blasting and support staff …
So the tables above are what i have set up as the db so far ..
Employees are of different levels depending on who they report to
piterden 2021-03-16 16:21:43
Kev In 2021-03-16 16:12:41
So, the company has a several depts .. i.e , Bs strategy, Finance , Store, HR, Architecture Design, Construction, Mechanical , Drilling,Blasting and support staff …
So the tables above are what i have set up as the db so far ..
Employees are of different levels depending on who they report to
Does a single employee have ability of belong to a few departments?
Deb_575 2021-03-16 16:33:03
2021-03-15 19:07:32
how to recover a deleted mysql. ibd file if u Dont have any backup? any link?
There is something called mysqlbinlog –flashback for innodb tables in mysql 8.0 that can be used to recover the data provided you at least have binary logs. It’s a tideous task though
Kev In 2021-03-16 16:35:09
They belong to just one department and always report to just one person but there’re unique situations where guys from the drilling dept would assist in work in the construction depts ..
piterden 2021-03-16 16:38:19
Kev In 2021-03-16 16:35:09
They belong to just one department and always report to just one person but there’re unique situations where guys from the drilling dept would assist in work in the construction depts ..
And what is the general issue your database should solve?
Kev In 2021-03-16 16:47:25
Well my database should be able to solve the issues of reporting .. who reports to who .. but at the moment I’m been told to simplify it .. it has to much duplications ..
piterden 2021-03-16 19:10:48
What duplication?
piterden 2021-03-16 20:48:56
For what purpose the same?
piterden 2021-03-16 20:57:23
Why do you need the same if you already have one?
piterden 2021-03-16 21:01:04
So what do you need?
piterden 2021-03-16 21:05:49
Which elements exactly?
piterden 2021-03-16 21:14:21
There are strict rules of its behavior in different situations. You’d better to read documentation first, then ask about things keeped unclear for you.
MasterZiv 2021-03-16 22:03:50
Hi guys. Can enybody give me an advise? Where from can I upload testing models of MYSQL base, describing employe or staff, or something like?
rodrigo_tc7 2021-03-17 10:29:09
It throws an error, table already exists
rodrigo_tc7 2021-03-17 10:29:34
And then, probably, duplicated key
bfklbf30 2021-03-19 06:10:59
bfklbf30 2021-03-19 06:11:16
hello, that is the expected answer
bfklbf30 2021-03-19 06:11:27
bfklbf30 2021-03-19 06:11:34
this is what i have done
bfklbf30 2021-03-19 06:11:43
anyone can help me with this matter
MasterZiv 2021-03-19 08:19:48
bfklbf30 2021-03-19 06:11:34
this is what i have done
This is not even close to what’s needed.
JordanErifried 2021-03-19 10:42:16
Ah that great I can do that
bfklbf30 2021-03-19 10:56:39
MasterZiv 2021-03-19 08:19:48
This is not even close to what’s needed.
So what is the correct way
MasterZiv 2021-03-19 11:00:16
bfklbf30 2021-03-19 10:56:39
So what is the correct way
it is too long to explain in chat.
You must extract YEAR , use windowing functions to group records by year, range records by whatever defines this f… rating (it is NOT stated in the task, BTW), and limit each group by only one record.
rodrigo_tc7 2021-03-19 21:00:26
As ilia said, Maybe you can first get every year and country
Then add a subquery to get the top vendor “where” matches that year and country, perhaps using order and limit
Finally, union that with the same query, but change the limit to show the second one
Order as desired at the end
rodrigo_tc7 2021-03-19 23:41:14
Windowing functions is only supported since version 8
Ujjawal 2021-03-20 16:49:44
Can someone help me how to use join in these tables I created?
Ujjawal 2021-03-20 16:50:43
I have 3 tables – product, invoice, invoice_item.
I have to retrieve product_name from product table and issued, due, paid from invoice table.
Ujjawal 2021-03-20 16:51:28
Product table and invoice table are linked to the third table(invoice_item)
Ujjawal 2021-03-20 16:51:39
In lines 23 and 24
rodrigo_tc7 2021-03-20 18:51:40
hi, fix the gaps
select product_name, isued, due, paid
from product
join invoice_item on product_id = product.id
join invoice on invoice.id = invoice_id
Ujjawal 2021-03-20 19:23:31
Thanks Rodrigo. Works perfectly.
rodrigo_tc7 2021-03-20 19:23:54
^_^
← prev | next →