mysql - SQL request using left join -


i have 2 tables.

table : (id, type, ...)
here id primary key

table b : (id, timestamp, old_type, new_type, ...)
here id not primary key

i want make sql request return such ids each a.type not same last (by timestamp) b.new_type.

is helpful nikita?

select a.* a a.type!= (      select b.new_type b b order `timestamp` desc limit 1 ) 

Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -