MySQL Last Distinct row

I've got a table with some duplicate entries, I've been trying different query combinations but I've been unable to solve

this problem.

Here is an example of my problem

[url removed, login to view]

Basically I would like to get the last distinct value (entry id: 9634), I've got many item_id's with duplicate field_value's.

Payment will be provided as soon as confirmed as working.

I've attached the table layout, I want a query that will select the latest unique value for item_id and field_id.

So the query would display these results
entry_id field_id item_id field_value
2 1 1 424
4 2 1 432434
6 1 2 4324
8 2 2 4324324

I can pay with Paypal once I confirm code is working as I want. So far I'm using this query
SELECT DISTINCT field_id, item_id, MIN(entry_id) as entry_id, MIN(field_value) as field_value FROM values2 WHERE item_id!='0' GROUP BY field_id, item_id ORDER BY item_id, field_id ASC

but that is pulling the first distinct values not the latest/last distinct values like I want.


Compétences : PHP

en voir plus : mysql distinctrow, distinctrow mysql, mysql distinct, mysql select distinctrow, mysql last, mysql last group, mysql select last distinct, mysql last row, select distinctrow mysql, mysql distinct last, mysql distinct latest, distinct mysql, mysql view distinctrow, mysql last distinct, mysql group last row, mysql last row group, distinct mysql last row, mysql distinct day, last row group php, mysql select last row value row

Concernant l'employeur :
( 0 commentaires ) Wokolena, Australia

Nº du projet : #332085

5 freelance font une offre moyenne de $63 pour ce travail


Hello. I can solve the problem for you in a very short time. Please give me a chance to help you. Thanks.

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(9 Commentaires)

No problem happy to help you

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 0 jours
(0 Commentaires)

i can solve this problem... lets start this

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(0 Commentaires)

Hello. Let's start.

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(0 Commentaires)

I've got a couple of solutions here for you, one that I have optimised for speed, and the other for usability. I'm a SQL DBA and MCSD - I'm pretty good at this kind of stuff.

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(0 Commentaires)