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
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- difference between primary key and unique key
- phpMyAdmin – Error > Incorrect format parameter?
- Why is my database import losing text widget data?
- Please explain how WordPress works with MySQL character set and collation at a low level
- Is there a way to list all used/unused WP templates?
- Reset Post IDs to less than 64bit integer
- WordPress database scalability from the code perspective
- Does WordPress use the InnoDB engine for MySQL by default?
- Multipart/formatted MySQL query problem
- Why does dbDelta() not catch MysqlErrors?
- SQL query equivalent to WP User Query
- How to sort results from a custom database table
- what to do when your WordPress database is too large?
- WordPress and automated MySQL backups to a different host
- How to insert data into MySQL database from the form created in WordPress site
- WordPress site uses MyISAM, should I switch to InnoDB necessary?
- How to prevent WordPress from retrieving data for the last 10 posts in the database?
- Uppercase to sentence case for post titles
- WordPress mysql table double prefixes
- WordPress database import: Row size too large
- Why do mass updates to post_content shows in front end, but not in edit screen?
- Export / import WordPress database
- Improve performance by removing unnecessary database queries
- Redirecting to old domain after migration website
- How do I see the mysql query generated by get_posts( $args )?
- WordPress Database Huge wp_usermeta Table
- Switching Databases in LocalHost
- cache specific data?
- Unable to set a default serialized array using dbdelta()
- Check if an option exists and get its value in one hit
- Making a query to the DB using same parameters of loop
- 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
- Installing local to live WP into subdirectory
- 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
- I want to get on those users their meta value are like “AGENT” .. but this query is not working
- I imported an restore an database and It shows #1067 – Invalid default value for ‘user_registered’
- “BS_” rows in postmeta table
- What’s the easiest way to connect external database and display data on wordpress?
- mySQL database size large, but tables size less
- After renaming MySQL database, I can no longer access my Blog page
- Are there any best practices for creating a Like/Favourite feature in WordPress using custom MySQL tables and without any plugins?
- 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
- 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
- Have WordPress Use a Different Database for users