Implement search by geologicalTime

Query uses simple concatenation of Period,Epoch,Age and matches Period
hierarchically.
Copied MySQL query from php code