merge_sales_stock_month_data: merge sales data and stock data from BI database

Description Usage Arguments Details Value Examples

View source: R/merge-sales-stock-month-data.R

Description

full join sales data and stock data

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
merge_sales_stock_month_data(
  con,
  date,
  brand_name,
  channel_type = NULL,
  area_name = NULL,
  boss_name = NULL,
  category_name = NULL,
  shop_no = NULL
)

Arguments

con

BI con connector

date

the start date of you select

brand_name

the name of brand

channel_type

direct store and franchise store ,the channel of store sales

area_name

area name

boss_name

the franchise customer

category_name

the category name of goods

shop_no

the shop of Number

Details

the output data group by year month SHOP_NO SKU_NO sales num sales money the price money goods stocks number

门店属性:SHOP_NO 门店名称 原ERP店编码 品牌 一级部门 门店性质 国家 管辖区域 省份 城市 城市等级 门店负责人 区域经理 经营状态 店铺类型 老板 加盟商编码 加盟商名称 重点客户标识 年可比店 当月可比店 门店属性 仓位类型

商品属性:SKU_NO SAP_NO SKC_NO 款号 商品简称 商品名称 大类名称 中类名称 小类名称 定价品类 是否标配镜片 吊牌价 海外吊牌价 价格带 厂商品牌 镜框材质 镜框大小 镜框款式 镜框颜色 眼镜框型 镜片功能 镜片颜色 能否染色 球镜 柱镜 折射率 商品品牌 系统上市时间 最早销售日期 SYS_ID 分析大类

以上字段可以参考spb数据库中store_table 和sku_table.

当需要添加字段属性较多时,可以用 get_sales_data()在关联门店信息表和商品信息表

Value

a data.frame about sales and stock data

Examples

1
2
get_sales_data
get_sales_data(con,闂ㄥ簵鎬ц川,鍒嗘瀽澶х被,start_date = '2020-01-01',end_date = '2020-10-25',brand_name = 'MUJOSH')

zyf19940501/ghzy documentation built on Dec. 23, 2021, 10:13 p.m.