I have a mysql query I am working on, part of it is correct and part of of it is not. I need help correcting the issue. I can provide sample data and queries.
This is the main query in its current state. amtbill column does not sum correctly. I'm sure it is the type of join but I am not sure how to fix.
SELECT [login to view URL], [login to view URL], [login to view URL], [login to view URL], (
[login to view URL]
), (
[login to view URL] + [login to view URL]
) AS amtbill, [login to view URL], [login to view URL], [login to view URL], [login to view URL], [login to view URL], [login to view URL], [login to view URL], [login to view URL], [login to view URL], [login to view URL], [login to view URL], [login to view URL], [login to view URL], [login to view URL], [login to view URL], [login to view URL] AS ctrackerzip, [login to view URL], [login to view URL], [login to view URL], [login to view URL]
FROM needsPrice
LEFT JOIN notes
LEFT JOIN schedule ON [login to view URL] = [login to view URL] ON [login to view URL] = [login to view URL]
LEFT JOIN data ON [login to view URL] = [login to view URL]
LEFT JOIN advdata ON [login to view URL] = [login to view URL]
WHERE [login to view URL]
BETWEEN '2018-12-01'
AND '2018-12-10'
Below is how I fact check the data. By using a SUM I can tell amtbill is wrong.
SELECT [login to view URL], [login to view URL], [login to view URL], [login to view URL], SUM( [login to view URL] ) , SUM( [login to view URL] + [login to view URL] ) AS amtbill, [login to view URL], [login to view URL], [login to view URL], [login to view URL], [login to view URL], [login to view URL], [login to view URL], [login to view URL], [login to view URL], [login to view URL], [login to view URL], [login to view URL], [login to view URL], [login to view URL], [login to view URL], [login to view URL] AS ctrackerzip, [login to view URL], [login to view URL], [login to view URL], [login to view URL]
FROM needsPrice
LEFT JOIN notes
LEFT JOIN schedule ON [login to view URL] = [login to view URL] ON [login to view URL] = [login to view URL]
LEFT JOIN data ON [login to view URL] = [login to view URL]
LEFT JOIN advdata ON [login to view URL] = [login to view URL]
WHERE [login to view URL]
BETWEEN '2018-12-01'
AND '2018-12-10'
Hello,
As an expert in SQL, i am very much interested to fix the query. Please send me the database or related tables with data so that i can run the query and fix it. I am available now to work on it, if you want i can work on your PC.
Thanks
$24 USD in 0 day
5.0 (247 reviews)
7.5
7.5
12 freelancers are bidding on average $35 USD for this job
Hello, I have gone through the sql. I understood that fetching the tables by join is somewhere leading to incorrect data and want to know about the purpose of each tables, when datas are stored & what is the output u want. Please open message board for further discussion so that i can solve the issue.
Thanks
Ramesh
Hello there,
Hope you are doing well !!
I CAN FIX IT NOW.
It's straight to your referenced post I am an expert in MYSQL and having good experience over queries. I can fix it.
I'm interested in your project. Please send me a message so that we can discuss more.
Looking forward to hear more from you for any query.
Sincerely,
Ashish
Sr. WP Developer
Hello Sir,
I can review your query. Please provide me the copy of database and the query. I'll complete it and provide you. Till then don't award me the project. So you may have assurity if i can do that or not. (I know customer's insecurity that's why)
I am available and can start it right away
HI, I AM A PHP PROGRAMMER AND WEB DEVELOPER. I HAVE A LOT OF EXPERIENCE IN PHP CODING
AND DIFFERENT KINDS OF SCRIPTING LANGUAGES. I HAVE DEVELOPED MANY DYNAMIC WEBSITES USING WORDPRESS AND MYSQL QUERY.
I CAN MAKE SURE WHAT YOU NEED. PLEASE SHARE FURTHER INFORMATION.
THANKS
This looks fairly straightforward, especially if you already know the expected output.
Depending on the relationship between the tables, there could be some normalization required in order to get the correct amounts summed. It will be much easier to determine the cause of the issue with some sample data.