???SQL Schema??10 ??????
???????????? ???????[ 2015/9/6 10:43:07 ] ?????????????
????6. ?????????洢????????????????
??????????Unix??????????????????洢???????????????????????????????????????SQL?????????????????????????????Щ???????????????????????????????????????????????????漰????timestamp??datetime????????????????SQL?????????
????select date(from_unixtime(created_at)) from packages
????-- vs
????select date(created_at) from packages
??????????????????洢??????????С????????????????й???????е???????????д?????????????????????????????????????SQL?????????????
????select date(created_year || '-' || created_month || '-' || created_day)
????-- vs
????select date(created_at)
????7. ???????UTC
????????????????UTC???????????????????????????????????Periscope???????????????UTC?????????????????????й??????Periscope?У???????:pst?????UTC???????????
????select [created_at:pst]?? email_addressfrom users
??????y?????????????UTC??????????datetime???ж?????????????????????磬???????timestamp????
???????????????????????UTC??????????????????UTC???UTC?????????????????е?????????????????????
????8.??????????
????????????????е???????????Source of Truth?????????????Rollup????????????????????????????????????????????????????????????????????????
????select *from daily_usage_rollup
??????????棬??????user_id??user_id_old????user_id_v2???????ж??????????????????????????????????????????л?????????????????????????ε??????
????9.??????????JSON?е???
???????????й??????????????г?????????в????????Щ?????????????????磬answer1??answer2??answer3?????????????????е????ù????
?????????????????????????????????????е???????????????????????????????磬?????????м?????????????????????????????
????select
????sum(
????(case when answer1 is not null
????then 1 else 0 end) +
????(case when answer2 is not null
????then 1 else 0 end) +
????(case when answer3 is not null
????then 1 else 0 end)
????) as num_answers
????from surveys
????where id = 123
????-- vs
????select count(response)
????from answers
????where survey_id = 123
?????????????????????JSON?г????????????????????????????????к?????????????????????????JSON?У????????????????????????????????y?JSON?в????????????????????????????????????????
????10?????????淶??
????????????????????????????????????????????淶?????????????????涼??????Щ?????????????????????????????????????SQL??????????????????????????????
????select
????dates.d??
????count(1)
????from users
????join dates on users.created_date_id = dates.id
????group by 1
????-- vs
????select
????date(created_at)??
????count(1)
????from users
????group by 1
??????????????е?????????к??????????????????????κ????????????????????????????????С?
?????????????????? ????????????????????????3????????????Щ????????????????????????????????????????????????и????????飬??????????hello@periscope.io??????????????????????
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
???????sql server 2000??????????????SQL Server???????????????????λ?????SQL Server??????????????????????????????SQL Server??Azure SQL??SQL SERVER ?????????????汾??????SQL Server??WITH (NOLOCK)SQL Server??????????????DML??????????SQL Server????????????????????SQL Server??????SQL Server???????????Ч?????????SQL Server?????????????????SQL Server?????????????????SQL Server????????SQL SERVER????????SQL Server????δ???????SQL SERVER??????????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????