sql - extract field only when we have least one registration -


i have 2 tables :

author(id_author, date_conf, id_visitor, id_article) visitor(id_visitor, email, registration_date, registration_fees, ...) 

i want extract articles (id_article) when @ least 1 author have done registration (registration fees not empty or null (logically))

for example, when natural inner join

(id_author, registration_fees, id_article, ...) (0, 123.1, 1) (1, null, 1) (2, null, 2) 

it should extract id_article because has 123.1. authors of id_article 2 didn't pay registration.

how can please?

i think want want:

select id_article author join      visitor v      on a.id_visitor = v.id_visitor registration_fees not null group id_article 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -