Join the discussion
Question 44/100
You are analyzing sales data in Snowflake using Snowpark to identify seasonality. You have a table named 'SALES DATA with columns 'SALE DATE (TIMESTAMP NTZ) and 'AMOUNT (NUMBER). You want to calculate the rolling average sales for each week over a period of 12 weeks using a Snowpark DataFrame. Which of the following Snowpark code snippets correctly implements this calculation?
Correct Answer: B,E
Options B and E are correct. They both calculate the 12 week rolling average grouped by week correctly and will display the average. Option B is the more correct of the two, because it does not require the user to sort the result to get the appropriate rolling average. Option A is incorrect because rangeBetween with seconds is not appropriate for weekly aggregation and calculation. Option C is incorrect because to_date would truncate the time component, grouping everything with the same date. Option D calculates a cumulative average since the beginning of the dataset
Add Comments
- Other Question (100q)
- Q1. You are working with a dataset containing customer reviews for various products. The datas...
- Q2. You have trained a linear regression model in Snowpark ML to predict house prices. After t...
- Q3. You're deploying a pre-trained model for fraud detection that's hosted as a serverless fun...
- Q4. You are tasked with deploying a real-time fraud detection model in Snowflake. The model re...
- Q5. You are building a data science pipeline in Snowflake to perform time series forecasting. ...
- Q6. You are tasked with predicting the sales price of houses based on their size (square foota...
- Q7. You are building a product recommendation system using Snowflake Cortex. You have a table ...
- Q8. A data scientist is analyzing website conversion rates for an e-commerce platform. They wa...
- Q9. A Snowflake table named 'SALES DATA contains a 'TRANSACTION DATE column stored as VARCHAR....
- Q10. You are developing a machine learning model within a Snowflake UDF (User-Defined Function)...
- Q11. You've trained a model using Snowflake ML and want to deploy it for real-time predictions ...
- Q12. A data scientist needs to calculate the cumulative moving average of sales for each produc...
- Q13. You are tasked with identifying fraudulent transactions from unstructured log data stored ...
- Q14. You've created a Python stored procedure in Snowflake to train a model. The procedure succ...
- Q15. You have trained a logistic regression model in Python using scikit-learn and plan to depl...
- Q16. You are tasked with validating a regression model predicting customer lifetime value (CLTV...
- Q17. You're working with a Snowflake stage named that contains several versions of your machine...
- Q18. You are building a multi-class classification model in Snowflake to predict the category o...
- Q19. You are troubleshooting an external function in Snowflake that calls a model hosted on Goo...
- Q20. You are developing a real-time fraud detection system using Snowpark and deploying it as a...
- Q21. You are working with a Snowflake table 'CUSTOMER DATA containing customer information for ...
- Q22. You are tasked with building a fraud detection model using Snowflake and Snowpark Python. ...
- Q23. You are developing a fraud detection model in Snowflake using Snowpark Python. You've iter...
- Q24. You are investigating website session durations stored in a Snowflake table named 'WEB SES...
- Q25. You are performing exploratory data analysis on a dataset containing customer transaction ...
- Q26. You are tasked with creating a new feature in a machine learning model for predicting cust...
- Q27. Consider the following Python UDF intended to train a simple linear regression model using...
- Q28. You are designing a feature engineering pipeline using Snowpark Feature Store for a fraud ...
- Q29. You have deployed a fraud detection model in Snowflake and are monitoring its performance....
- Q30. A data science team at a retail company is using Snowflake to store customer transaction d...
- Q31. A marketing team at 'RetailSphere' wants to segment their customer base using unstructured...
- Q32. You have deployed a sentiment analysis model on AWS SageMaker and want to integrate it wit...
- Q33. You are deploying a machine learning model to Snowflake using a Python UDF. The model pred...
- Q34. You are developing a Python stored procedure in Snowflake to train a machine learning mode...
- Q35. You are building a machine learning model to predict loan defaults. You have a dataset in ...
- Q36. You are developing a fraud detection model in Snowflake. You've identified that transactio...
- Q37. A data scientist is building a churn prediction model using Snowflake data'. They want to ...
- Q38. Consider the following Snowflake SQL query used to calculate the RMSE for a regression mod...
- Q39. You are working on a customer churn prediction project. One of the features you want to no...
- Q40. You are validating a time series forecasting model for daily sales using Snowflake and Sno...
- Q41. You've built a customer churn prediction model in Snowflake, and are using the AUC as your...
- Q42. You are tasked with fine-tuning a Snowflake Cortex LLM model using your own labeled datase...
- Q43. You have a table in Snowflake named 'CUSTOMER DATA' with columns 'CUSTOMER D', 'PURCHASE A...
- Q44. You are analyzing sales data in Snowflake using Snowpark to identify seasonality. You have...
- Q45. You are tasked with deploying a time series forecasting model within Snowflake using Snowp...
- Q46. You've built a regression model in Snowflake to predict customer churn. You've calculated ...
- Q47. You are tasked with identifying Personally Identifiable Information (PII) within a Snowfla...
- Q48. You are tasked with building a data science pipeline in Snowflake to predict customer chur...
- Q49. You are evaluating a binary classification model built in Snowflake for predicting custome...
- Q50. A data scientist is preparing customer churn data for a machine learning model in Snowflak...
- Q51. You are a data scientist working with a large dataset of customer transactions stored in S...
- Q52. You are tasked with deploying a pre-trained sentiment analysis model hosted externally usi...
- Q53. You have built a customer churn prediction model using Snowflake ML and deployed it as a P...
- Q54. You are a data scientist working for a retail company using Snowflake. You're building a l...
- Q55. You are tasked with building a machine learning pipeline in Snowpark Python to predict cus...
- Q56. You are training a regression model to predict house prices using a Snowflake dataset. The...
- Q57. You are analyzing customer churn for a telecommunications company. You have a Snowflake ta...
- Q58. You are developing a Python UDTF in Snowflake to perform time series forecasting. You need...
- Q59. You are building a machine learning pipeline that uses data stored in Snowflake. You want ...
- Q60. You have deployed a regression model in Snowflake as an external function using AWS Lambda...
- Q61. You are building a time-series forecasting model in Snowflake to predict the hourly energy...
- Q62. You are analyzing sensor data collected from industrial machines, which includes temperatu...
- Q63. A data science team is evaluating different methods for summarizing lengthy customer suppo...
- Q64. You are tasked with preparing customer data for a churn prediction model in Snowflake. You...
- Q65. You have developed a customer churn prediction model using Python and deployed it as a Sno...
- Q66. You are using Snowpark for Python to build a feature engineering pipeline for a machine le...
- Q67. You've developed a fraud detection model using Snowflake ML and want to estimate the expec...
- Q68. You are working with a large dataset in Snowflake and need to build a machine learning mod...
- Q69. A financial institution suspects fraudulent activity based on unusual transaction patterns...
- Q70. You are analyzing customer transaction data in Snowflake to identify fraudulent activities...
- Q71. You are working with a large dataset of transaction data in Snowflake to identify fraudule...
- Q72. You are building a machine learning pipeline in Snowflake using Snowpark Python. You have ...
- Q73. You are using Snowpark Pandas to prepare data for a machine learning model. You have a Sno...
- Q74. You are tasked with estimating the 95% confidence interval for the median annual income of...
- Q75. You are building a model deployment pipeline using a CI/CD system that connects to your Sn...
- Q76. You have a dataset in Snowflake containing customer reviews. One of the columns, 'review_t...
- Q77. You're working with a large dataset of user transactions in Snowflake. You need to identif...
- Q78. You are tasked with deploying a fraud detection model in Snowflake using the Model Registr...
- Q79. You are developing a model to predict equipment failure in a factory using sensor data sto...
- Q80. You are tasked with building a data pipeline using Snowpark Python to process customer fee...
- Q81. You've built a model in Snowflake to predict house prices based on features like location,...
- Q82. A retail company is using Snowflake to store transaction data'. They want to create a deri...
- Q83. You are using Snowflake Cortex to perform sentiment analysis on customer reviews stored in...
- Q84. You are working with a large dataset of customer transactions in Snowflake. The dataset co...
- Q85. You have a structured dataset in Snowflake containing customer information and purchase hi...
- Q86. You have built and deployed a model to predict the likelihood of loan default using Snowpa...
- Q87. You are exploring a large dataset of website user behavior in Snowflake to identify patter...
- Q88. You are working with a Snowflake table named 'CUSTOMER DATA' containing customer informati...
- Q89. You have successfully deployed a real-time prediction service using Snowpark Container Ser...
- Q90. You are developing a Spark application that needs to read data from a Snowflake table and ...
- Q91. You are building a model training pipeline in Snowflake using Snowpark Python. You want to...
- Q92. You're a data scientist analyzing sensor data from industrial equipment stored in a Snowfl...
- Q93. You are working with a dataset containing timestamps representing website user activity. T...
- Q94. You're developing a Python UDTF in Snowflake to perform sentiment analysis on customer rev...
- Q95. A data scientist is tasked with predicting house prices using Snowflake. They have a datas...
- Q96. You are training a fraud detection model on a dataset containing millions of transactions....
- Q97. You are working with a dataset of customer transaction logs stored in Snowflake. Due to le...
- Q98. A data scientist is tasked with building a real-time customer support system using Snowfla...
- Q99. You are using the NetworkX library in Snowpark Python to analyze social network data store...
- Q100. You have deployed a machine learning model in Snowflake to predict customer churn. The mod...
