By experience I recommend you not to write raw SQL queries in your application unless you know the consequences and vulnerabilities that could be opened through that code.
In my work I see many websites hacked every day because of this, and WordPress is not the friendliest environment to work with magic functions. You should use the built-in functions to interact with the database, or at least use “prepare” [1] as @rossmitchell suggested.
Anyway, if you still want to take the risk to write raw SQL queries, you may want to check the official documentation [2] which includes examples of how to CRUD (Create, Read, Update, and Delete) the database manually; maybe you already saw that link, but I still want to leave this information here for future references.
[1] https://developer.www.ads-software.com/reference/classes/wpdb/prepare/
[2] https://codex.www.ads-software.com/Class_Reference/wpdb