[MariaDB 10.4, PHP8.0] How can I rewrite this so it works so it get weight_date from the row with MAX(total_weight) and list it AS highest_weight_date? I have read that we can’t use MAX() among with WHERE? I have tested to rewrite several examples, but I give up and embarrassed show my latest try: I try to add it to this
Tag: groupwise-maximum
Slow Querying DB
I am currently optimising a system with many connected tables. The part that I am working on right now is displaying table orders. The problem is that in this table there are also many relations (around 10) which I am querying. The problem itself is in querying that many relations. I have been using Eloquent + with() methods for eager
SQL – Select the most close values to date in a table
Hi everyone i have a table called measure made up like this And I want to select all the lowest values such as I can do it by code but i prefer to use SQL for performance reason so I tried this query: but the result is not good, I see too many results and are also somehow duplcated, how