Q1. Please write SQL codes to query data from member tables based on below criteria Please write a SELECT statement to display each member data that street must NOT be ‘STREET’ and ‘LANE’, and valid_date CANNOT be ‘FEB’, ‘APR’, and ‘JUN’. Please display the result in descending order of the last_name. The result should be identical to below results: [SCREENSHOT] I try to use this, but it gives me this error: SELECT MEMBER_ID, FIRST_NAME, LAST_NAME, STREET, FORMAT(VALID_DATE, 'dd-MM--yy') FROM MEMBER WHERE STREET NOT IN ('STREET', 'LANE') AND MONTH(VALID_DATE) NOT IN (2, 4, 6) ORDER BY LAST_NAME DESC; ====== error ===== ORA-00904: "MONTH": invalid identifier ORA-00904: "FORMAT": invalid identifier
Q1. Please write SQL codes to query data from member tables based on below criteria
Please write a SELECT statement to display each member data that street must NOT be ‘STREET’ and ‘LANE’, and valid_date CANNOT be ‘FEB’, ‘APR’, and ‘JUN’. Please display the result in descending order of the last_name. The result should be identical to below results:
[SCREENSHOT]
I try to use this, but it gives me this error:
SELECT MEMBER_ID, FIRST_NAME, LAST_NAME, STREET, FORMAT(VALID_DATE, 'dd-MM--yy')
FROM MEMBER
WHERE STREET NOT IN ('STREET', 'LANE')
AND MONTH(VALID_DATE) NOT IN (2, 4, 6)
ORDER BY LAST_NAME DESC;
====== error =====
ORA-00904: "MONTH": invalid identifier
ORA-00904: "FORMAT": invalid identifier
![MEMBER ID FIRST NAME LAST NAME
STREET
VALID DAT
|
110 JACK
WHITE
123 ΜΑΙΝ ROAD
01-JAN-99
114 JACK
RED
123 LΥNN ROAD
01-MAY-99
118 JACK
GRAY
123 JONE ROAD
01-SEP-99
116 JACK
CRIMSON
123 JAY ROAD
01-JUL-99
112 JACK
BLUE
123 CREE ROAD
01-MAR-99](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fdc587c31-a247-493d-b2ae-563348ff8a62%2F0a9ec194-b276-48da-9a99-0ec2efcbcaba%2Fcf3ne2p_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)