A clause used in SQL SELECT statements to sort query results.

learn more… | top users | synonyms

2
votes
1answer
58 views

Why is MySQL order by performance poor within a single partition of a partitioned table?

I have to store some sequence numbered data in MySQL. I have about 300,000 data items per day for about a 10 year span. Let's say the table structure is just sequence number (a big int) and data (a ...
0
votes
1answer
77 views

Update one table from another table while sorting that table based on one column

This is the problem I'm trying to figure out in MySQL. We have an old table contains some forms submitted by our users. Somehow, the previous decision was each time a user comes to this survey, a new ...
1
vote
0answers
180 views

MySQL GROUP BY and ORDER BY giving inconsistent results

I'm currently working with WordPress, and I've added a new meta value which is a number between 0 and 30. Zero is ignored and up to 30 need to be organised in order and only the latest (based on the ...
0
votes
0answers
35 views

Group by collection_item_id and order by products.weight

SELECT `products`.* FROM `products` INNER JOIN collection_items ON products.collection_item_id = collection_items.id WHERE `products`.`product_type_id` = 1 AND (products.status = ...
0
votes
0answers
104 views

GROUP_CONCAT with ORDER BY , but results are not orderd

SELECT *, (SELECT GROUP_CONCAT(url SEPARATOR '$$' ) FROM project_photos WHERE project_id = projects.id ORDER BY priority) AS images FROM projects WHERE catID = 2 LIMIT 0,5 above query works fine but ...