MySQL Forums
Forum List  »  General

Re: eloquent mysql: aggregate data returned by query with sums (group concat?)
Posted by: Christian Nuvoli
Date: March 24, 2016 11:02AM

Thanks for your hint, I will look at cross tables, I assume you know a lot about crosstables.. if it's not too much trouble could you help try to rewrite this query so that it outputs like this:

[
      {
      "model_id": 218,
      "4": "30%",
      "5": "70%",
      "Total": 10

      },
      "model_id": 219,
      "4": "30%",
      "5": "70%",
      "Total": 10
      },
 
]

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.