Posts

Showing posts with the label phpmyadmin

Reformat first row column based on other rows

Image
Clash Royale CLAN TAG #URR8PPP Reformat first row column based on other rows I have a table which contains US cities, some cities have multiple zip codes and they are one row with one zip code as shown below in the screen shot, I want this to be store as one row per city with their multiple zip codes in comma split format in the zip column, Is there any way to do this? Expected result would be like below image By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

SQL Query for find the decade with the largest number of records

Image
Clash Royale CLAN TAG #URR8PPP SQL Query for find the decade with the largest number of records I have a database including the following tables: ACTOR (id, fname, lname, gender) MOVIE (id, name, year, rank) DIRECTOR (id, fname, lname) CAST (a_id, m_id, role) MOVIE_DIRECTOR (d_id, m_id) Now I want to retrieve the data of the following question. Ques: "A decade is a sequence of 10 consecutive years. For example, 1965, 1966, ..., 1974 is a decade, and so is 1967, 1968, ..., 1976. Find the decade with the largest number of films" Homework? What have you tried? – JimmyB 2 hours ago Hint: Every movie can be seen to be the beginning of a decade. Then, the decade are all years between this movie's year and the movie's year+10. – JimmyB 2 hours ago ...