By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,397 Members | 2,552 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,397 IT Pros & Developers. It's quick & easy.


P: 2

I want to write a query in MySQL, ( I am still learning from Websites), for the desired result in the attachment.

I am not using a table rather, entering the path of the file with sheet name.

Please Help.
Attached Files
File Type: xlsx MySql.xlsx (9.2 KB, 23 views)
May 14 '19 #1
Share this Question
Share on Google+
4 Replies

P: 1
RangGuru, Thank for joining and Welcome to Bytes Community for IT Professionals!
May 14 '19 #2

Expert Mod 5K+
P: 5,397
Please keep in mind, many people will not download attachments that are not specifically requested by one of our experts.

You would be much better off listing the data, using the [code/] format will hold a space deliminated table
Expand|Select|Wrap|Line Numbers
  1.    [A]  [b]  [c]
  2. [1] x    y    z
And showing the result you're after as an equation
sum([A,1],[B,1],[C,1]) = Sum(x,y,z)

Please read thru the FAQ for other suggestions on posting your question.FAQ/PHP
May 15 '19 #3

P: 2

Thank You for your guidance. Kindly find below my requirement.

Name Type Value
A Labour 100
A Parts 200
B Labour 50
B Parts 150

The result expected is

Name Labour Parts
A 100 200
B 50 150

Thank You
May 15 '19 #4

Expert Mod 5K+
P: 5,397
.... group concat might work......
Normally I like to put a full example; however, this is a bit much - this site is one I goto when playing with mysql:
Towards the bottom of the page page is a nice example.

Try writing the SQL
if it doesn't work post back your SQL (formatted using the [CODE/] tool please :) ) along with your results and we can go from there!
May 15 '19 #5

Post your reply

Sign in to post your reply or Sign up for a free account.