Getting a list of SQLite tables and columns

I was thinking of writing an F# SQLite Type Provider and the start point would be to get the needed metadata to generate the types. Here's how you can get a list of tables, columns and its types:

SELECT m.name AS tableName
      ,c.name AS columnName
      ,c.type AS columnType
FROM sqlite_master m
LEFT OUTER JOIN pragma_table_info((m.name)) c
     ON m.name <> p.name
ORDER BY tableName, columnName, columnType;

Source: https://stackoverflow.com/a/50548508