Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9049429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T12:23:47+00:00 2026-06-16T12:23:47+00:00

I have been searching the Web and SO without finding an answer to a

  • 0

I have been searching the Web and SO without finding an answer to a rather simple question. The thing may be that I don’t know how to phrase it. Here is what I am trying to do.

I have a MySQL table with multiple SKUs (let’s call it skutable) and for each line I have a certain number of columns describing the SKU : name, price, price-range (I have 4 different price-ranges), week of publishing, … and a certain number of columns describing the performance of the SKU : revenues, margin, quantitysold …

What I would like to do if writing an SQL query that allows me to display (with PHP) a table that would show for example :

In line : weeks / In column : price-ranges / In the cell : the % of SKUs belonging to a certain price-range for a given week.

or another example would be :

In line : weeks / In column : price-ranges / In the cell : the % of qty sold for SKUs belonging to a certain price-range for a given week.

I’ve been trying to write a query that would provide an array of multiple-arrays as a result but it doesn’t seem to work.

If anyone knows how to do ?

thanks,

E.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T12:23:48+00:00Added an answer on June 16, 2026 at 12:23 pm

    Your SQL query has to return one row (% of SKU, % of quantity sold) for each combination: week * price-range * another-dimension-if-needed. Then do your “tabular / cross tab” logic in PHP by looping through the results, or looping from min to max for each dimension and looking for the corresponding data in results.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been searching the web for a solution for 3 hours without success.
I have been searching the web for an answer now for quite a while,
I have been searching the web for a concrete and simple example of binding
I have been searching the web, (and StackOverflow), for an answer to what appears
I have been searching everywhere on the web and trying everything that I can
I have been searching the web for an answer to my problem, but so
I have been searching for a command that will return files from the current
I have been searching in stackoverflow for a question similar to mine because it
I have been searching for an answer and trying out stuff for days now
I have been searching for a few hours and cant seem to find answer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.