What OFX is
OFX is the format behind the Download Transactions button on your bank's website. Version 1 is SGML, where a leaf element has an opening tag and no closing one. Version 2 is real XML. QFX is Intuit's variant of the same thing with a few extra tags, which is why a .qfx file opens in Quicken and is refused by software that only knows plain OFX.
Retail banks, credit card issuers and brokerages, because it is what Quicken and Microsoft Money asked for and the industry standardised on.
What SQL is
SQL here means the statements that move a table into a database: INSERT INTO with a VALUES list, and optionally the CREATE TABLE that defines the columns.
Anyone seeding a database, moving a spreadsheet into an application, or writing a migration.
What changes when you convert OFX to SQL
Each STMTTRN block becomes a row: date, amount, type, payee, memo, cheque number and the bank's own transaction id. The account number and currency come from the statement header and are added to every row, so a file merged with another still says which account it came from. Both the SGML and the XML flavour are read the same way.
String values are escaped by doubling any single quote. Statements are written in batches so a large table does not become one statement megabytes long, which many clients refuse. Ask for CREATE TABLE as well and column types are inferred: a column stays INT until a value does not fit, then widens to DECIMAL, then to VARCHAR.
What carries over from OFX to SQL
One property of the OFX has no home in SQL, and it is worth knowing which before you convert.
OFX can hold a value that is itself a list or an object. SQL has only flat cells, so nested values are flattened into one cell rather than being spread across columns.
SQL marks its header cells differently from its data cells, so the first row is written with that marker.
The result can be read a record at a time, and appended to by adding to the end of it. That is worth having for a table too large to hold in memory, and it means a SQL file that is cut off part way through still gives you every record before the cut.
Both formats record types, so numbers, booleans and nulls survive as themselves rather than as text.