0
Hello, I’m beginner, I’m learning to select, and would like to receive help from this wonderful community.
I need to take only the invoices that are with the a_winning status of each student, would more or less group by id the invoices that are with the status a_winning.
I have a table called invoices with the following fields: id, student id, value, salary and status where each student has multiple invoices, each invoice has the student id, some invoices are paid and others are due, and I wanted to make a select on that table and locate students who have only 1 invoice in arrears.
How would I do that? I appreciate everyone’s help! Thank you
The table invoices has the columns id, value and maturity, the status win is stored in which column?
– Laércio Lopes
Thank you for helping me! I’m sorry, the invoices table has the columns id, value, maturity and status! Thank you
– La Souza
Then the value stored in the column status is the word win?
– Laércio Lopes
So, invoices that have not yet been paid are status a_expire, and paid invoices are status paid.
– La Souza
Which fields should be selected? All? from the table invoice same or of students?
– Laércio Lopes
Make sure the answer is what you need and accept if you’re right.
– Laércio Lopes