If you’re talking about building queries only, there’s Sequoia:
If you’re talking about actually interfacing with an SQL database, there’s Caqti:
There are also several engine-specific libraries, such as postgresql-ocaml, pgocaml, pgx, ocaml-mysql, etc.