Unique visitors in cloudflare - cloudflare

What is difference between total unique visitors vs maximum unique visitors? Why is maximum unique visitors less than total unique visitors?
For example, in report of cloudflare of my site, total unique visitors value is 300, maximum unique visitors value is only 55.

Total unique visitors
This is the overall number of unique visitors for the whole month. So, you had 300 visitors in total that month.
Maximum unique visitors is the most visitors you had in one day during that month. So, on your best day that month you had 55 people visit.
Minimum unique visitors is the smallest number of visitors you had in one day during that month.
To learn more about Cloudflare analytics, have a look at their blog post about it https://blog.cloudflare.com/introducing-partner-analytics/

Related

Restaurant day by day number of meals served

I'm looking for a dataframe which gives a day by day number of meals served for a restaurant (any restaurant would work).
Does anyone know if this exists ?
Thanks

Calculate Day 7 retention rate of all players acquired on specific data

I'm new to SQL and I'm struggling with few of the questions on my exercise. How to calculate Day 7 retention rate of all players acquired on 01 October 2019. The tables shown is just a sample of what the extended table is.
My answer was:
SELECT
Session_table,
COUNT(DISTINCT user_id) as active_users,
COUNT(DISTINCT future_ user_id) as retained_users,
CAST(COUNT(DISTINCT future_ user_id) / COUNT(DISTINCT user_id) AS float) retention
FROM inapp_purchase
LEFT JOIN user_id as future_id
ON user_id = future_ user_id
AND user_id. inapp_purchase = user_id.session_table - datetime(page_views.pv_ts, '+7 day')
GROUP BY 1
There are two tables:
session_table
When each user_id starts a session , the session will have a unique session_id. Session_length_seconds tells how long a session lasted in seconds. level tells what game level the player was at the end of that session. The session_table will have one line for each session each user has (users can have multiple sessions per day each with unique session_id).
inapp_purchase
The inapp_purchase table has one line for each product that the user (denoted by user_id) purchased. There can be multiple purchases in a day per user, per session. The session_id and user_id here can link to the session_table to track active users who also make a payment. Product_id tells which product was purchased and the purchase_value tells the amount the user paid in $.
There are also three requests for the inapp_purchase table:
Calculate daily average revenue per daily active user for last 3 months
Calculate the daily average revenue per paying user year to date?
Calculate the daily conversion rate over the last month? This measure is defined by the proportion of daily active users who make a purchase on the day in question.
Please let me know if the above information is sufficient.
Thank you for your help.

SQL GROUPING SETS averages with multiple many-to-many dimensions

I have a table of data with the following:
User,Platform,Dt,Activity_Flag,Total_Purchases
1,iOS,05/05/2016,1,1
1,Android,05/05/2016,1,2
2,iOS,05/05/2016,1,0
2,Android,05/05/2016,1,2
3,iOS,05/05/2016,1,1
3,Android,06/05/2016,1,3
1,iOS,06/05/2016,1,2
4,Android,06/05/2016,1,2
1,Android,06/05/2016,1,0
3,iOS,07/05/2016,1,2
2,iOS,08/05/2016,1,0
I want to do a GROUPING SETS (Platform,Dt,(Platform,Dt),()) aggregation to be able to find for each combination of Platform and Dt the following:
Total Purchases
Total Unique Users
Average Purchases per User per Day
The first two are simple as these can be achieved via a sum(Total_Purchases) and count(distinct user) respectively.
The problem I have is with the last metric. The result set should look like this but I don't know how to get the last column to be calculated correctly:
Platform,Dt,Total_Purchases,Total_Unique_Users,Average_Purchases_Per_User_Per_Day
Android,05/05/2016,4,2,2.0
iOS,05/05/2016,2,3,0.7
Android,06/05/2016,5,3,1.7
iOS,06/05/2016,2,1,2.0
iOS,07/05/2016,2,1,2.0
iOS,08/05/2016,0,1,0.0
,05/05/2016,6,3,2.0
,06/05/2016,7,3,2.3
,07/05/2016,1,1,1.0
,08/05/2016,1,1,1.0
Android,,9,4,1.8
iOS,,6,3,1.2
,,15,4,1.6
For the first ten rows we see that getting the Average purchase per user per day is a simple division of the first two columns as the dimension in these rows represent a single date only. But when we look at the final 3 rows we see that the division is not the way to achieve the desired result. This is because it needs to take an average for each day in turn to get the overall per day amount.
If this isn't clear please let me know and I'll be happy to explain better. This is my first post on this site!

Shopify api total sales

how can i get total sales from shopify store for api call? anyone have idea?I got total price by date but not total sale.
I need total sales by min and max date.
Thanks in advance.
You can get the total amount of orders that you need for the range that you need, then get the ceiling of the order count divided by the amount per page (this will get you the total amount of pages you need to get). For example, if you have 730 orders for a day and 250 orders per page, you will need to get 3 pages of orders. You can then get the 3 pages of orders and add up the totals.
https://docs.shopify.com/api/reference/order#count
you have to loop the order list response and sum up the "total_price" field. If you need accuracy you have to subtract any refunds sum from your total sum.
Yes there is a json object for refunds. In Python you can retrieve the refund information with json_response['orders'][number_in_the_list]['refunds']. Make sur to add to your GET request the status=any endpoint so you'll get /admin/api/2021-07/orders.json?status=any plus your other endpoints.

Issue with multiple subqueries

I need to do a subquery within a subquery. For example, on a given day (3-July-14) we have 2 services done (see below). Each of these services has three costs, a basic, additional labour and additional parts charge. These three added up become our OverallCharge. We then need to determine the min, max and avg of these overall charges.
I know how find out the OverallCharge and minimum, maximum and average overallcharge required.
SELECT MIN(OverallCharge) AS MinOverallCharge, MAX(OverallCharge) AS MaxOverallCharge, AVG(OverallCharge) AS AverageOverallCharge
FROM (SELECT ServiceId, Sum([S.BasicCharges]+[S.AdditionalLabourCharges]+[S.AdditionalPartCharges]) AS OverallCharge
FROM Service AS S
GROUP BY ServiceId) ;
The next part is finding out the services per service day, which I have done successfully,
SELECT Service.ServiceDate, Count (Service.ServiceId) AS NumServices
FROM Service
GROUP BY ServiceDate;
I now need to combine the two (somehow) and find out the amount of services done, the minimum and maximum overall charge as well as the average and group by service date and not service ID. (I.E. fin on any given day, what the minimum and maximum overall charge of a service was and what was the average overallcharge that day). It should appear in columns of, date, services done, min, max and avg overallcharges. Any help would be greatly appreciated