Skip to main content
added 115 characters in body
Source Link
jbchurchill
  • 4.5k
  • 22
  • 41

The reason they don't add up is that in query 1, you have a condition Query 1: (this) AND NOT (that).

Queries 2 and three have only one condition Query 2: (this) Query 3: (that)

You undoubtedly have some records where (this) is true AND (that) is true and also where they are both false.

Try modifying query 1 (take out NOT)

(railway NOT IN (Null,'') AND osmSupportingElement = 'no') AND (railway IN ('platform') AND (osm_level LIKE ('%-%') OR osm_layer LIKE ('%-%') OR osm_location IN ('underground','underwater')))

(railway NOT IN (Null,'') AND osmSupportingElement = 'no') AND (railway IN ('platform') AND (osm_level LIKE ('%-%') OR osm_layer LIKE ('%-%') OR osm_location IN ('underground','underwater')))

and see what you get. Also try breaking the queries into smaller pieces and you may come by the answer on your own (see my comment).

The reason they don't add up is that in query 1, you have a condition Query 1: (this) AND NOT (that).

Queries 2 and three have only one condition Query 2: (this) Query 3: (that)

You undoubtedly have some records where (this) is true AND (that) is true and also where they are both false.

Try modifying query 1 (take out NOT)

(railway NOT IN (Null,'') AND osmSupportingElement = 'no') AND (railway IN ('platform') AND (osm_level LIKE ('%-%') OR osm_layer LIKE ('%-%') OR osm_location IN ('underground','underwater')))

and see what you get.

The reason they don't add up is that in query 1, you have a condition Query 1: (this) AND NOT (that).

Queries 2 and three have only one condition Query 2: (this) Query 3: (that)

You undoubtedly have some records where (this) is true AND (that) is true and also where they are both false.

Try modifying query 1 (take out NOT)

(railway NOT IN (Null,'') AND osmSupportingElement = 'no') AND (railway IN ('platform') AND (osm_level LIKE ('%-%') OR osm_layer LIKE ('%-%') OR osm_location IN ('underground','underwater')))

and see what you get. Also try breaking the queries into smaller pieces and you may come by the answer on your own (see my comment).

Source Link
jbchurchill
  • 4.5k
  • 22
  • 41

The reason they don't add up is that in query 1, you have a condition Query 1: (this) AND NOT (that).

Queries 2 and three have only one condition Query 2: (this) Query 3: (that)

You undoubtedly have some records where (this) is true AND (that) is true and also where they are both false.

Try modifying query 1 (take out NOT)

(railway NOT IN (Null,'') AND osmSupportingElement = 'no') AND (railway IN ('platform') AND (osm_level LIKE ('%-%') OR osm_layer LIKE ('%-%') OR osm_location IN ('underground','underwater')))

and see what you get.