Good morning everyone before anything!
Today I have a question like every day.
I have this table in JavaFX as you can see I have 2 columns Placa y Km Sobrepasado So what I need to do here is load the data Plate and KmSobrepoasado from mu control table in mysql what happens is that the field Km exceeded is a sum of all the kilometers that have been entered in the column kmrecoaux: this is the column. To obtain that utlizo sum (kmrecoaux) as SumKmTotal
Here I show you the query you try to make but I get an error:
SELECT placa, kmrecoaux FROM control where sum(kmrecoaux) >= 5000
Ok now they will say But what do you want to do with that data and that table! Answer: I need to show all the plates of the vehicles that the sum of their kmrecoaux is greater than or equal to 5000. which means that it needs maintenance. But since the sum is a column that is created by an "ace" I do not know how to perform the query.