Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write in SQL Expressions GENERAL FORMAT You can create expressions by combining basic attributes using a host of algebraic operators and built-in functions: Useful algebraic
Write in SQL
Expressions GENERAL FORMAT You can create expressions by combining basic attributes using a host of algebraic operators and built-in functions: Useful algebraic operators: -, +, *, / Useful time functions: NOW, DATEDIFF (), WEEKDAY (), WEEKDAYNAME () Use the online help to find out more about the above-mentioned functions, if interested Following is a basic example. Try execute this query and notice the results: Here is another example for you to try - this query will tell us what day of the EXAMPLES SELECT DateDiff ("d", PURCHDATE, Now) AS DaysSincePurchase FROM PURCHASE week our purchases were made on: SELECT AcctNum, CampNum, WEEKDAYNAME (WEEKDAY (PURCHDATE)) AS DayOfWeek FROM PURCHASE DO IT YOURSELF (DIY) Write a query to return all the details for purchases in the past 30 days. You'll notice that there are no purchases fitting this criterion in the database. You should use the DataSheet View of the PURCHASE table to add a purchase within the last 30 days, so that you can test your query. SAVE THIS QUERY IN THE DATABASE AS "09_ALL_PURCHASES_ LAST 30_DAYSStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started