0

I have to build a Oracle Application with a line chart in it. The data for it comes from a database.

In the database, there are two columns, called Datum; Number_VMs. Column "Datum" is the date on which the entry was made, column "Number_VMs" is the amount of VMs that still exist.

The diagram should show, how many VMs still exist on the specific date. how do I need to write my SQL Query for that? Could someone help me with that?

Kind Regards

6
  • Maybe: SELECT Datum, Sum(Number_VMs) AS SumV FROM tablename GROUP BY Datum;
    – June7
    May 10, 2022 at 5:52
  • Hi, can I also add a filter to this, or do I need to change something drastically?
    – Elias
    May 10, 2022 at 7:00
  • Yes, can add filter with WHERE or HAVING clause. Really basic SQL. Suggestion assume Datum is date only, no time components.
    – June7
    May 10, 2022 at 17:35
  • Yes, "Datum" is in the Format "DD.MM.YYYY", if this is important.
    – Elias
    May 11, 2022 at 4:56
  • You are using international structure. I don't know if Oracle will have issue with that. If you were using Access it would, review allenbrowne.com/ser-36.html.
    – June7
    May 11, 2022 at 5:55

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.