I’m pretty average in my sql skills and having trouble finding a definitive answer on google so here goes.
I have a SQLite database with log data from several sources. View1 is a view of all the queries and View2 is a subset of those records. Occasionally when we see a record in one source we’ll see a record in another source within a few seconds. So what I’m trying to get is all the records in View2 and the records in View1 that looks something like this:
SELECT * FROM View1 WHERE (View1.ID=View2.ID) OR ((View1.Epoch_Start BETWEEN
View2.Epoch_Stop AND (View2.Epoch_Stop+5)) AND View1.String LIKE '%string%'
I know I could get this accomplished in my perl script but is there a SQL method that would be better?
USE (INNER) JOIN: