楼主: teihohou
1339 2

need help for coding [推广有奖]

  • 0关注
  • 0粉丝

大专生

13%

还不是VIP/贵宾

-

威望
0
论坛币
642 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
430 点
帖子
29
精华
0
在线时间
37 小时
注册时间
2010-11-22
最后登录
2024-3-5

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币

Sample Task


We have 2 MySql tables that have cost, revenue, and 1 SASdataset that has web stats data


tbl_cost:

financial_date (i.e., 2013-06-01)

Site (i.e., suggest.com, note there could be many sitesin this dataset)

Source (where the visitor came from i.e., Google notethere could be many sources in this dataset)

Adgroupid (a lower level of source, i.e., Travel, notethere could be many adgroupid’s in this dataset)

cost (amount of cost, $150. – can be any number from 0to infinity)

cost_clicks (amount of clicks, 100, – can be any numberfrom 0 to infinity)

1 row per financial_date/site/source/adgroupid

tbl_revenue:

financial_date (i.e., 2013-06-01)

Site (i.e., suggest.com, note there could be many sitesin this dataset)

Source (where the visitor came from i.e., Google notethere could be many sources in this dataset)

Adgroupid (a lower level of source, i.e., Travel, notethere could be many adgroupid’s in this dataset)

revenue (amount of net revenue, $300, – can be anynumber from 0 to infinity)

revenue_clicks (amount of clicks, 50, – can be anynumber from 0 to infinity)

impressions (ad impressions, 100, – can be any numberfrom 0 to infinity)

multiple rows per financial_date/site/source/adgroupid

web_stats

financial_date (i.e., 2013-06-01)

Site (i.e., suggest.com, note there could be many sitesin this dataset)

Source (where the visitor came from i.e., Google notethere could be many sources in this dataset)

Adgroupid (a lower level of source, i.e., Travel, notethere could be many adgroupid’s in this dataset)

visits (similar to cost_clicks, 100, – can be anynumber from 0 to infinity)

pageviews (pages looked at, 500, – can be any numberfrom 0 to infinity)

multiple rows per financial_date/site/source/adgroupid

The datasets are entire days worth of data, so we wouldhave a separate dataset for 6/1 vs. 6/2 and they would look like this;

web_stats_20130601 , web_stats_20130602

tbl_cost & tbl_revenue are located on server'financials' assume the database is the same as the server name

web_stats is located at '/sas/datasets/stats/'


All that being said, I would like to get a program thataccepts a date (i.e., 6/1/2013), queries the MySql tables (i.e., wherefinancial_date = '2013-06-01') and opens the correct web_stats dataset(i.e.web_stats_20130601), and joins all 3 together, summarizes it at the followinglevels below and in the end appends back to a MySql database table calledfinancial_date_sum on 'financials' server, assume database is the same('financials').

Summary levels (4 levels);

financial_date

Site, financial_date

Site, source, financial_date

Site, source, adgroupid, financial_date


Also create the following variables:

ppv = pageviews/visits

profit = revenue - cost

conv_rate = revenue_clicks/cost_clicks

Also calculate day over day(dod) and week over week(wow)growth rates for ppv, profit, and conv_rate.

I would like to be able to put in a time frame (last 10days), process each day, delete day from 'financial_date_sum' (if it exists inthere already), and append to 'financial_date_sum'


Lastly, 'financial_date_sum' MySql table should have oneadditional column on it called summary_by and it should be a character variablethat indicates what level the summary is at (i.e, Site, source, adgroupid,financial_date)


The 'financial_date_sum' MySql table should have thefollowing columns then;

financial_date

site

source

adgroupid

summary_by

cost

cost_clicks

revenue

revenue_clicks

impressions

visits

pageviews

ppv

dod_ppv_growth_rate

wow_ppv_growth_rate

profit

dod_profit_growth_rate

wow_profit_growth_rate

conv_rate

dod_conv_rate_growth_rate

wow_conv_rate_growth_rate


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:Coding Help Need DING COD Google revenue number Travel amount

沙发
mingfeng07 学生认证  发表于 2014-8-26 09:43:29 |只看作者 |坛友微信交流群
英文看着太费劲,另外也没有数据样本。

使用道具

藤椅
teihohou 发表于 2014-8-26 10:07:33 |只看作者 |坛友微信交流群
tbl_cost:
financial_date (i.e., 2013-06-01)
Site (i.e., suggest.com, note there could be many sitesin this dataset)
Source (where the visitor came from i.e., Google notethere could be many sources in this dataset)
Adgroupid (a lower level of source, i.e., Travel, notethere could be many adgroupid’s in this dataset)
cost (amount of cost, $150. – can be any number from 0to infinity)
cost_clicks (amount of clicks, 100, – can be any numberfrom 0 to infinity)
1 row per financial_date/site/source/adgroupid
一个一个看

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-25 21:04