Hi all, I’ll be teaching from http://www.datacarpentry.org/sql-ecology-lesson/03-sql-joins-aliases/ soon, and realized there is a section here on IFNULL and NULLIF that I haven’t taught before. In all my years of using SQL, I’ve never even heard of these functions! So, I’m trying to learn this quickly.
I cannot seem to wrap my brain around how to do this Challenge, and there is no answer key. (Also, plural of “genus” is “genera”!) * Write a query that returns the number of genus of the animals caught in each plot, using IFNULL to assume that unknown species are all of the genus “Rodent”. I’m at a loss as to how to replace NULL values in genus field with a value based on what is in the species_id field. Can someone help me out? Thanks! ~ Amy Amy E. Hodge, PhD Science Data Librarian [email protected]<mailto:[email protected]> 650.556.5194 [cid:[email protected]] orcid.org/0000-0002-5902-3077<https://orcid.org/0000-0002-5902-3077> Data Management Services Branner Earth Sciences Library, 212 Mitchell 397 Panama Mall; MC 2211 Stanford University Stanford, CA 94305
_______________________________________________ Discuss mailing list [email protected] http://lists.software-carpentry.org/listinfo/discuss
