Tags:
create new tag
, view all tags
"je veux tous les identificateurs CIZA qui n'ont pas le bibcode 2002ApJ...580..774E"

Voici la démarche que j'ai suivi :

1 - je sélectionne tous les CIZA :

query select distinct id from identifier where id like 'CIZA%'

2 - de facon totalement indépendante, j'essaye de compter le nombre de fois où le bibcode est dans la liste des bibcodes pour des objets tirés au hasard :

query select count(*) from has_bib_ref, bib_ref, identifier where oidbibref = oidbib and identifier.oid4ref = has_bib_ref.oid4ref and id = 'CIZA J0649.3+1801' and bibcode = '2002ApJ...580..774E'

--> résulat = 1 (j'ai bien ce bibcode)

query select count(*) from has_bib_ref, bib_ref, identifier where oidbibref = oidbib and identifier.oid4ref = has_bib_ref.oid4ref and id = 'M   1' and bibcode = '2002ApJ...580..774E'

--> résultat = 0 (normal, ce bibcode n'est pas dans M 1)

3 - Maintenant, pour chaque objet obtenu en (1) je veux compter avec ma requete trouvée en (2) et avoir 0 :

on prend la requete (1), on ajoute la condition que le résultat de la (2) est = 0 et on relie les 2 requetes en remplacant le id = 'CIZA J0649.3+1801' dans la (2) par id1.oid4ref = id2.oid4ref :

select distinct id from identifier as id1 where id like 'CIZA%' and (
. . . select count(*) from has_bib_ref, bib_ref, identifier as id2 where oidbibref = oidbib and id2.oid4ref = has_bib_ref.oid4ref and id1.oid4ref = id2.oid4ref and bibcode = '2002ApJ...580..774E') = 0

Topic revision: r1 - 2007-04-17 - AnaisOBERTO
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback