# Revision history [back]

Hello,

First, it is going to be difficult at best to give a definitive answer. Even with all the information it could take some time to figure this out. However, some information on direction can be provided.

Normalization (Wiki here) is not only important for databases but also for your queries. In stating you have the six additional queries, it seems if they are similar, their results can be gotten with a UNION statement and then applied to your main query. But there is another problem. In looking (briefly) at these last two queries I don't see how the results relate back to the original query. There has to be something in common to tie them all together.

Don't try to look at the final result. Take one small piece at a time like: Are the last two shown related? - combine them; the other four not shown similar? - combine them; UNION apply? This is how your other SQL questions were solved. Get result of a small part, get result of next pat, now combine them, move on to next part.

As for MariaDB, I have that set on a Debian 8 test partition with various connectors. Be glad to help with that but it should be a separate question. It is fairly simple once you understand different connectors. I typically use MySQL & PostgreSQL on my Mint 18.2 partition regularly. MySQL connection data is almost identical to that of MariaDB.

Hello,

First, it is going to be difficult at best to give a definitive answer. Even with all the information it could take some time to figure this out. However, some information on direction can be provided.

Normalization (Wiki here) is not only important for databases but also for your queries. In stating you have the six additional queries, it seems if they are similar, their results can be gotten with a UNION statement and then applied to your main query. But there is another problem. In looking (briefly) at these last two queries I don't see how the results relate back to the original query. There has to be something in common to tie them all together.

Don't try to look at the final result. Take one small piece at a time like: Are the last two shown related? - combine them; the other four not shown similar? - combine them; UNION apply? This is how your other SQL questions were solved. Get result of a small part, get result of next pat, now combine them, move on to next part.

As for MariaDB, I have that set on a Debian 8 test partition with various connectors. Be glad to help with that but it should be a separate question. It is fairly simple once you understand different connectors. I typically use MySQL & PostgreSQL on my Mint 18.2 partition regularly. MySQL connection data is almost identical to that of MariaDB.

Edit:

Aside from my comment below, yet another look again shows no common ground between the three queries. It appears the second two are missing the selection of "EBSales"."ID" which seems would give you the needed connection among the queries. Once you have this common ground, you can JOIN the query results much like my answer in your previous question posted here.