बस अपनी डेटाबेस संरचना और अपनी क्वेरी का उपयोग करके, और चूंकि MySQL में FULL OUTER JOIN उपलब्ध नहीं है, मुझे लगता है कि इसका समाधान यह हो सकता है:
SELECT
`newsid`,
`text`,
CASE
WHEN `datetime` IS NULL THEN `pdate`
ELSE `datetime`
END as `datetime,
`pcount`
(
SELECT *
FROM `news` as `n`
LEFT OUTER JOIN (
SELECT count(pictureid) as `pcount`, datetime as `pdate`
FROM picture GROUP BY DATE(datetime)
) as p ON DATE(n.datetime) = DATE(p.datetime)
UNION
SELECT *
FROM `news` as `n`
RIGHT OUTER JOIN (
SELECT count(pictureid) as `pcount`, datetime as `pdate`
FROM picture GROUP BY DATE(datetime)
) as p ON DATE(n.datetime) = DATE(p.datetime)
)