This is what I wanted to achieve, I hope it helps somebody
DELETE wp_posts FROM wp_posts
INNER JOIN wp_users ON wp_posts.post_author = wp_users.ID
WHERE post_author = 1 AND post_date BETWEEN '2024-01-01 00:00:00' AND '2024-03-28 23:59:59';
Related Posts:
- DB prefix not updating
- I wanted to Know that how can I give ingore to 0000-00-00 in my config file
- Inserting Post Meta From SQL
- Would manually deleting the dumping data fix a “#1062 – Duplicate entry ‘1’ for key ‘PRIMARY'” phpMyAdmin error?
- Delete all post meta except featured image
- How to execute mulitple statement SQL queries using $wpdb->query?
- Delete duplicate rows from wordpress database where a column is duplicate in phpmyadmin
- Query WordPress database by registered date and role
- Set Display Name to first and last name (phpmyadmin SQL Query)
- Size article thumbnails and retrieve them directly from database
- Emojis getting converted to “?”
- Delete all post meta except featured image Using SQL
- wpdb_prepare with multiple or condition
- SQL Error wp_commentmeta – incorrect table definition
- WordPress and MySQL: how to transfer Meta_key and Meta_Value from one post_id to another
- How do I get the posts within a certain year/date(with sql query)?
- WordPress database import: Row size too large
- WordPress Database Huge wp_usermeta Table
- Create table from array with prepare
- Changing root password in PHPMyAdmin for WordPress Database when going live
- Can’t update WordFence Options, clear data manually
- Why this query is not showing any result on wordpresss home page?
- How to migrate a database from a server to another
- Why does changing Database Table Prefixes result in loss of content?
- SQL query to set posts in bulk based on the post content
- Files on Localhost, Database on Server
- $wpdb->get_var – What value is returned when zero records are found?
- Installing local to live WP into subdirectory
- I imported an restore an database and It shows #1067 – Invalid default value for ‘user_registered’
- How to create index (sql) to a meta_key?
- Delete all users meta that named: user_avatar
- The MySQL Connection could not be established., before it was joomla but i have change it into worpress
- How to retrieve user data based on role using SQL?
- WordPress character set issue
- Missing latest posts and options after DB migration via phpMyAdmin
- Check if a database is well installed
- Migrated to Namecheap, now Trouble with Database & wp-config [closed]
- export individual posts to text files or a single csv file
- SQL query : Select a thumbnail for a media
- why you don’t Implement PDO for access every thing to database
- SQL Query to get post_id from wp_posts and and meta_key(s) from wp_postmeta
- Database table prefix different between wp-config.php and in database
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- MySQL SELECT increment counter
- how to drop partition without dropping data in MySQL?
- MySQL equivalent of DECODE function in Oracle
- How to create a foreign key in phpmyadmin
- Restoring WordPress posts from database only
- Getting wrong relationship value in $args in wp_Query?
- Slow wp_term_relationships query
- Organizing WP Pages based on old website database
- Using Dynamic Data Pulled from a MySQL Table in a WordPress Page
- What are conventions about the schema of the $table_prefix
- Migrating non-WordPress CMS to WordPress, lots of data to move — possible solutions?
- Is deleting orphaned wp_options entries safe?
- How to solve slow WordPress site caused by attachment_metadata
- WooCommerce – Query for ordered products
- Large database causes slow load
- Database slowdown after update to 3.4.1
- How to insert data into MySQL database from the form created in WordPress site
- Which is more efficient? Using usermeta, or creating a new MySQL table?
- What happens if I overwrite the current wp_options table with a backup from a week ago?
- Handling large N data in WordPress
- How to Mirror WordPress database from Remote server to Local server
- A MySQL DB within a MySQL DB
- Will changing the folder name two directories above a fresh wordpress installation break the site?
- Is there a way to recover the table wp_term_relationships?
- Trouble Migrating all data blog from WordPress.com to WordPress.org
- Insert Query not working in the form
- Problems with moving my WordPress site to another domain/server
- pull data from a remote wordpress database
- Clear Terms from Taxonomy for Specific Post IDs?
- Options on how to Display member specific data from a MS SQL database
- WP MultiSite: Can’t select database error after changing to new domain
- How to connect and insert data in database of wordpress?
- Buddypress avatar image in database [closed]
- How Do I Delete WordPress Posts Older Than 400 Days, From A WordPress Category
- wp_option table error while importing
- WordPress SQL – How to Check for Category?
- Only allow user to access a link once a year, based on their joining date
- Counting post and changing roles in mysql database. Query not code
- MSQL database wp_postmeta has meta key tve_revision
- Deleting empty meta key values
- “BS_” rows in postmeta table
- Migrating meta_key and meta_value from old theme to new one
- What’s the easiest way to connect external database and display data on wordpress?
- WordPress Database Query works in phpMyAdmin but not in the code
- Duplicate database to roll back theme & content changes
- mySQL database size large, but tables size less
- After renaming MySQL database, I can no longer access my Blog page
- How To connect to the same WordPress database with different database user
- can’t delete a row from post_meta table
- Create a new table on the database and save parameters from a contact form
- Options table – where does my values go?
- How to add data from wordpress tables to new database tables you have created
- Install WordPress with SQL database
- How to back-up a database on IIS
- Weird WP -Cli Error Connection Refused
- How to find fresh (last modified) and sql backup?
- Understanding Redundant postmeta Tables in WordPress Database