T4.4

T 2.7 Zoho Database

T 3.7

Monday, August 6, 2012

T 4.8




My first SQL query shows what products have had a profit of over $1000 and their dates. The business could use this data to predict future sales of large profits.

SELECT "Date", "Region", "Product", "Profit"
FROM "Sales"
WHERE "Profit" > 1000


https://reports.zoho.com/ZDBDataSheetView.cc?OBJID=793985000000007016&STANDALONE=true&privatelink=bae35263930364126defb812f5bce81e&ZDB_THEME_NAME=blue&DATATYPESYMBOL=true&REMTOOLBAR=false&SEARCHBOX=true&SHOWHIDEOPT=true


Chart based on above query that shows the average product profit when the profit profit is over $1000.

<img width='400' height='300' src='https://reports.zoho.com/ZDBChartEmbed.png?OBJID=793985000000008016&STANDALONE=true&privatelink=70b79cb58d37aa61dcf1d11345ecd1bc&WIDTH=400&HEIGHT=300&ZDB_THEME_NAME=blue&TITLE=true&DESCRIPTION=true' />


This SQL query shows profits from Mondays only. This will help businesses see how profitable Mondays are.

SELECT "Date", "Product", "Profit"
FROM "Sales"
WHERE weekday("Date") = '0'

/* 0 is monday */

https://reports.zoho.com/ZDBDataSheetView.cc?OBJID=793985000000007110&STANDALONE=true&privatelink=a08fdd04b2565c8eeb3f0c03d5b24a1c&ZDB_THEME_NAME=blue&DATATYPESYMBOL=true&REMTOOLBAR=false&SEARCHBOX=true&SHOWHIDEOPT=true


I realized that this query could be better and added a where clause that shows Mondays where the profit is over $3000

SELECT "Date", "Product", "Profit"
FROM "Sales"
WHERE weekday("Date") = '0' AND "Profit" > '3000'

/* 0 for weekday is monday */

https://reports.zoho.com/ZDBDataSheetView.cc?OBJID=793985000000007197&STANDALONE=true&privatelink=2b280bc22d5cf2e82234f8e7ab67bfc8&ZDB_THEME_NAME=blue&DATATYPESYMBOL=true&REMTOOLBAR=false&SEARCHBOX=true&SHOWHIDEOPT=true

No comments:

Post a Comment

Task 2.4 Zoho



Zoho url