I’m no SQL expert, but I think it would look something like this:
SELECT * FROM mydatabase.wp_users
INNER JOIN mydatabase.wp_usermeta
ON (wp_users.ID = wp_usermeta.user_id)
WHERE 1=1
AND wp_users.user_registered > '2014-03-15 00:00:00'
AND wp_users.user_registered < '2014-03-16 00:00:00'
AND ( (wp_usermeta.meta_key = 'wp_capabilities'
AND CAST(wp_usermeta.meta_value AS CHAR)
LIKE '%\"subscriber\"%') )
ORDER BY user_registered ASC ;
Related Posts:
- Delete duplicate rows from wordpress database where a column is duplicate in phpmyadmin
- SQL query to set posts in bulk based on the post content
- SQL Query to get post_id from wp_posts and and meta_key(s) from wp_postmeta
- Inserting Post Meta From SQL
- Change SQL get_results to search for posts with custom term in custom taxonomy
- Change all http to https in mysql databse?
- WooCommerce – Query for ordered products
- How to execute mulitple statement SQL queries using $wpdb->query?
- Size article thumbnails and retrieve them directly from database
- How to query the WordPress database to get posts of a certain custom post type, taxonomy and field?
- Select Multiple meta_value from WP DB; Single Query
- wpdb_prepare with multiple or condition
- SQL Error wp_commentmeta – incorrect table definition
- CRUD operations using WordPress database API
- 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)?
- Advanced SELECT query with condtional statements
- Slow queries constantly getting stuck on WordPress database of ~100,000 posts
- Create table from array with prepare
- Query multiple tables at once?
- Custom WordPress Table wpdb
- Why this query is not showing any result on wordpresss home page?
- Best practice to limit results in get_row()?
- Why does changing Database Table Prefixes result in loss of content?
- Query Column of Specific ID from Database Table
- $wpdb->get_var – What value is returned when zero records are found?
- How to display data from db in select list [closed]
- DB prefix not updating
- I wanted to Know that how can I give ingore to 0000-00-00 in my config file
- Job and Employee Performance Tracking with Product Safety
- WordPress Database Query works in phpMyAdmin but not in the code
- 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
- 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 rewrite all media URLs to end with .webp
- Deleting WordPress posts and media files based on author via MYSQL database
- SQL errors when querying for something with apostrophes
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- How do I restore a dump file from mysqldump?
- 1052: Column ‘id’ in field list is ambiguous
- 1052: Column ‘id’ in field list is ambiguous
- difference between primary key and unique key
- phpMyAdmin – Error > Incorrect format parameter?
- How to do a batch insert in MySQL
- How to fetch Data in WordPress using MySQLi or $wpdb
- Connect to database using wordpress wp-config file
- Display data from a non wordpress database on a page template
- Multipart/formatted MySQL query problem
- Bulk Update of Custom Post Type Post Status through SQL
- How do I add indexes to WordPress Database?
- Huge wp_options table
- Block search SQL from happening
- Scheduling posts in database
- How Do I Merge Categories With phpMyAdmin
- How to prevent WordPress from retrieving data for the last 10 posts in the database?
- Query from a different database than the default
- WordPress mysql table double prefixes
- Why do mass updates to post_content shows in front end, but not in edit screen?
- Error establishing database connection – high traffic?
- Bulk-create posts from SQL database
- Redirecting to old domain after migration website
- Replace/Mute/Stop Search Query
- How do I see the mysql query generated by get_posts( $args )?
- WordPress Database Huge wp_usermeta Table
- Migrating to WordPress Recipe Plugin and Some SQL Issues
- cache specific data?
- How to prevent/delay MySQL connections when an object cache is used?
- How to paginate information obtained from a query to a custom table?
- Error establishing a database connection,
- Is it possible to query from external database? [duplicate]
- Can’t update WordFence Options, clear data manually
- Is it possible to have more than 1 MySQL database in my WordPress blog?
- How and where is wordpress adding mySQL content to database?
- Using AND and bracket grouping in SQL not working
- Connecting to a different database
- Delete/Replace words from X to Y in post content
- How to delete a particular row in a database table
- How to create more than one new wpdb object?
- Remote database -> massive response time increase?
- Getting value from database table depending on field value
- Getting “Error Establishing a Database Connection” on localhost in new Mac OSX Lion environment
- SQL error with custom query
- custom tables in wordpress Database? (can i just create them with sql?)
- Accidently changed the GUID
- How to edit custom table data in frontend
- local wordpress broke after changing URL
- Help posting values to DB on submit using $wpdb->query
- wpdb query to insert images in to post/page gallery
- WPCLI search and replace in a particlar site dir effect another site-dir
- $wpdb not working
- Extracted CSV as Array for Custom Query Loop
- Hang Up Followed By Can’t select database
- Pulling values from a sepcific row in table
- Using class id from array for query
- How do I find users by password?