Create a list of actor pairs along with the number of films that they have in common

50
October 25, 2019, at 2:00 PM

have this query so far for the above question. Im a student who is just starting so any help would be appreciated. I am working with the sakila database

o1.actor_id as ActorID1, 
o2.actor_id as ActorID2,
Count(*) NoOfCommonMovies
FROM (SELECT F.actor_id, FA.film_id
FROM film_id as F
JOIN film_actor FA
ON FA.film_id = F.film_id
) AS o1
JOIN (SELECT F.actor_id, FA.film_id
FROM film_id as F
JOIN film_actor FA
ON FA.film_id = F.film_id
) AS o2
ON o2.film_id = o1.film_id AND o2.actor_id < o1.actor_id
GROUP BY o1.actor_id, o2.actor_id;```
READ ALSO
Restored MySQL for Azure instance is exactly the same as original

Restored MySQL for Azure instance is exactly the same as original

I tried restoring my MySQL database to a week ago, but when I log into the newly created database it still has records from todayI tried several times and got the same result

37
Inserting Image to the MySQL database via Spring Boot

Inserting Image to the MySQL database via Spring Boot

I want to store image as a blob in MySQL database using Spring BootI have created the following model to perform crud operations on the database

14
In MYSQL can I disable for anyone and everyone the drop table (or a DB) query?

In MYSQL can I disable for anyone and everyone the drop table (or a DB) query?

I would like to totally disable anyone from dropping a table or DB from MYSQL using a query / injectionI have just started to read about users and permissions, as far as Im aware I have never created any users

28
Can I reuse a where clause with many conditions in MySQL?

Can I reuse a where clause with many conditions in MySQL?

I am migrating many MySQL queries from being hard-coded in a Nodejs app to stored procedures (for use in a Java app)

48