Question: SELECT member.member _ ID , CONCAT ( member . Last _ Name, ' , ' , member.First _ Name ) AS Name, member.Email, CONCAT (
SELECT
member.memberID
CONCATmemberLastName, member.FirstName AS Name,
member.Email,
CONCATmemberPhoneAreaCode, member.PhoneNumber AS Phone,
MAXmemberfeepayment.DatePaid AS LatestPaymentDate,
DATEDIFF MAXmemberfeepayment.DatePaid AS DaystoExpiration
FROM
member
JOIN
memberfeepayment ON member.memberID memberfeepayment.memberID
WHERE
DATEDIFF MAXmemberfeepayment.DatePaid
GROUP BY
member.memberID
member.LastName,
member.FirstName,
member.Email,
member.PhoneAreaCode,
member.PhoneNumber;
this code is wrong incorrect feild list help me use a proper feild list to test the sql code
Members whose membership will expire within days from Feb
Explanation: To find the already expired members we have to check the date of the last paid membership fees and if it is less than th February and it has not been renewed then the membership has expired. So we have to select both the member and memberfeepayment table and check the corresponding membership with their unique member id
The SQL query to show members whose membership will expire within days of February th is as followings:
SELECT FROM member,memberfeepayment where member.memberID memberfeepayment.id and DATEDIFFdayDatePaid,
use columns membe ID Name last, First Name email phone # latest payment date number of days to expiration
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
