I have a database table of keys, let’s say about 200 keys in the table.
table keys: id | keys | sent
Every time a key is sent, the row of the key sent will equal to true.
I want to do a query that check the table. If the table keys has 10% keys left, an email will be sent to my boss to allow him to put more keys in the database.
I am newbie with sql. Should I do a query of join table or count row??
Any help or suggestion?
1 Answer