FOR SQL GURUS - Sajha Mobile
SAJHA MOBILE
FOR SQL GURUS
Posts 1 · Viewed 2937 · Go to Last Post
newbie69
· Snapshot 0
Like · Likedby · 0
Really need help with SQL
Does the code look right based on the questions?

1. Populate each table with 10 entries. (Check that the data is realistic)
/* Query populates 10 entries from each table */
SELECT * FROM CUSTOMER_t, VEHICLE_t, PARTS_t, SERVICE_TICKET_t, TECHNICIAN_t, INVOICE_t limit 10

SELECT * FROM CUSTOMER_t limit 10
SELECT * FROM VEHICLE_t limit 10
SELECT * FROM PARTS_t limit 10
SELECT * FROM SERVICE_TICKET_t limit 10
SELECT * FROM TECHNICIAN_t limit 10
SELECT * FROM INVOICE_t limit 10

2. Write a query that selects several entries in a table based on a particular attribute or set of attributes.
/* Query based on particular attribute */
SELECT First_Name FROM CUSTOMER_t WHERE CUSTOMER_t.Insurance_Company in (‘All State’)
GROUP BY First_Name

3. Write a query that joins data from two or more tables and outputs that data
/* Query that joins data from two tables */
SELECT SERVICE_TICKET_t.Ticket_ID, CUSTOMER_t.First_Name, SERVICE_Ticket_t.DATE_RECEIVED
FROM SERVICE_TICKET_t
INNER JOIN CUSTOMER_t ON SERVICE_TICKET_t.Customer_ID=CUSTOMER_t.Customer_ID;

4. Delete or change an entry from a table based on a particular attribute or set of attributes. (Comment this code carefully)
/* Deleting entry from table on given attribute */
DELETE FROM CUSTOMER_t
WHERE First_Name=‘Tony Mao’;
Please log in to reply to this post

You can also log in using your Facebook
View in Desktop
What people are reading
You might like these other discussions...
· Posts 1 · Viewed 63
· Posts 1 · Viewed 53
· Posts 1 · Viewed 57
· Posts 1 · Viewed 58
· Posts 1 · Viewed 59
· Posts 1 · Viewed 62
· Posts 2 · Viewed 219
· Posts 1 · Viewed 143
· Posts 1 · Viewed 146
· Posts 5 · Viewed 1246



Your Banner Here
Travel Partners
Travel House Nepal