Easy way to get Stats, Sum, Average, Min, Max etc?

Just having some phun with Wappler and now I’m wondering whats a good way to get Stats from DB. For example to use in a Dashboard or Chart. For example amount of DB Entries, or max / avg / min of some DB Values. Should I make for each a Query within my Actions? :laughing:

Simple answer yes, have a look at this. https://wapplerunwrapped.online/videoplayer.php?id=27

hehe okay perfect! Didnt you think about working for a Radio Station with your voice? :smiley:

PS: Second question: If I’m not going to use “Charts” Module and just want to show values directly within Page, how to do that? DO I need some Make Data Detail or so?

1 Like

Simple bootstrap table I would suggest

No I mean not with Bootstrap Table. For example if I have a Dashboard I want to have a text like:

Currently we have over 122 Adverts in our Database, where the last was added 4 days ago. The average price of all adverts 240$ where the cheapest advert** starts with 15.90$ and the most expensive ends up with 1290$. Currently a total of 380 Members are registered where the last Member signed up 2 days ago.

Looks like a paragraph with dynamic values inserted in the appropriate places would fit your requirements

1 Like

yes exactly what I mean but the area needs to be a „detail“? Cause I‘ only getting some (object) back… instead of results. I mean Its not a repeating area like rows etc

How are you doing this at server connect end? I guess you will need separate queries for each value and where you are using actions like sum or average give the result an alias
Don’t try and get everything in 1 query or it will probably not give you what you want.

@ben no I just thought about two possibilities:

  1. Make for each AVG, MAX, MIN etc one query. And use it via Server Connect.

or

  1. Query whole table and do these AVG, MAX, MIN etc via client side…

But 1) gives me more possibilities. But still not sure how to get just one result from solution 2) via Appconnect :thinking::smirk_cat:

2 Likes

Use option ,do it server side

1 Like

Okay will do that! Thank you @ben

Bit confused why you are tagging Ben though

Oh sorry mistake I mean you @Hyperbytes I‘ll just leave it for now :joy::ok_hand:t5: Thanx and have a nice sunday!

1 Like