data-lessons / library-sql-DEPRECATED

SQLite lesson for librarians NOW MOVED > https://github.com/LibraryCarpentry/lc-sql
https://github.com/LibraryCarpentry/lc-sql
Other
2 stars 16 forks source link

Rewrite sections "Filtering" and "Building more complex queries" #36

Open steltenpower opened 7 years ago

steltenpower commented 7 years ago

02-basic-queries SAYS:

Databases can also filter data – selecting only the data meeting certain criteria. For example, let’s say we only want data for a specific ISSN for the Theory and Applications of Mathematics & Computer Science journal, which has a ISSN code 2067-2764|2247-6202. We need to add a WHERE clause to our query:

SELECT * FROM articles WHERE issns='2067-2764|2247-6202';

But 2067-2764|2247-6202 is not a ISSN code, it's a combination of 2 (pipe-separated). In case you want to match both at the same time this is not the way, cause

First focus on fields that have 1 entry, perhaps ?