Peruttu

SQL query to gather information from 2 tables

Hello!

We are displaying data from a mySQL 5.1 database on our website. In the past we used an SQL query to gather the following fields from a table:

- first_name

- city

- state

- profession

- date_of_birth

where the "status" field of the user was confirmed.

In the past this was easy because all the users were stored in one table (wp_net_user), and 1 subscriber's data was stored in one line (first_name, state, city...) so it was easy to print out in a horizontal order with a MySQL query.

I don't know why but this was changed by the management and users and their fields are now stored in 2 different tables: wp_net_subscribers (first name, last name, status) and wp_net_custom_fields (city, state, profession, date_of_birth).

So we need an SQL query which shows these in a horizontal line:

from table "wp_net_subscribers":

- "first_name" field,

- "status" field

from table "wp_net_custom_fields" corresponding to the id of the subscriber:

- "city" field,

- "state" field,

- "profession" field,

- "date_of_birth" field

where the status is "subscribed" or "unsubscribed". So both statuses should be displayed. Or you can exclude "unconfirmed" status.

Taidot: Tietokannan hallinto, Tietokantaohjelmointi, MySQL, SQL

Näytä lisää: write sql query joins tables example database uses, complex sql query multiple tables, write sql query parent child relation tables database, sql server gather 2000 collation information, sql query tree view parent child tables, sql query filter tables, design sql query forum tree, sql query find number child elements, specialise sql query, getafreelancer message sql query help needed, sql query tree children, sql query tree structure, sql query child child, asterisk call forward database sql query, sql query tree structure records

Tietoa työnantajasta:
( 1 arvostelu ) Komarno 2, Slovakia

Projektin tunnus: #15814797

Myönnetty käyttäjälle:

16 € EUR 1 päivässä
(10 arvostelua)
3.2

55 freelancers are bidding on average €21 for this job

ITservice

Will create single query using both the tables and show in a row. Relevant Skills and Experience I have 15+ years of experience. Proposed Milestones €34 EUR - Project milestone Send me both tables structure.

34 € EUR 1 päivässä
(68 arvostelua)
6.7
Paznek

Can you try : select a.first_name, [url removed, login to view], [url removed, login to view], [url removed, login to view], [url removed, login to view], b.date_of_birth from wp_net_subscribers a inner join wp_net_custom_fields b on [url removed, login to view] = [url removed, login to view] and status <> 'unconfirmed'; Relevant Skills a Lisää

20 € EUR 1 päivässä
(14 arvostelua)
5.9
24 € EUR 0 päivässä
(21 arvostelua)
5.5
mail2vimalarora

Hi..having gone through your project details on SQL query, I can help you with quick and efficient solution. I am working professionally on sql and database tasks and can handle well. Relevant Skills and Experience Te Lisää

19 € EUR 0 päivässä
(55 arvostelua)
5.4
prakash2813

Hi there, This is an easy job for me. I can write join query to get expected output. Message me, we can do over team viewer as well. Relevant Skills and Experience I have strong knowledge in plsql, pivot tables, dynam Lisää

30 € EUR 0 päivässä
(19 arvostelua)
5.0
softcarve

Hi there, My name is Manish. I would like to write sql query to get details from wp_net_subscribers and wp_net_custom_fields in one line. please get in touch to discuss more. Relevant Skills and Experience I have good Lisää

9 € EUR 0 päivässä
(35 arvostelua)
5.1
30 € EUR 3 päivässä
(19 arvostelua)
5.1
23 € EUR 1 päivässä
(13 arvostelua)
4.8
14 € EUR 1 päivässä
(57 arvostelua)
5.4
kmpal

Hi, I am an experienced developer with vast experience in .NET, MVC, SQL, JS, TS, J-Query available for this project. I am full time freelancer available througout the day. Best Regards Khalid. Relevant Skills and Lisää

29 € EUR 1 päivässä
(7 arvostelua)
3.4
30 € EUR 1 päivässä
(2 arvostelua)
3.1
naveenlalwani77

Greetings! My name is Naveen lalwani and i am an expert in wordpress, php, sql, css, js. I would love to have the opportunity to discuss your project with you. Relevant Skills and Experience I have 4 years of experien Lisää

9 € EUR 1 päivässä
(7 arvostelua)
3.1
nraghuvanshi93

I know why this was done, for database optimization, it is a good process, and I can provide you a join query which can give you joined result from both table, its normalization, and its good for db. Relevant Skills Lisää

12 € EUR 1 päivässä
(2 arvostelua)
3.0
jayesh793

We have a few questions about your project, please send us message so that we can discuss more. Relevant Skills and Experience Relevant Skills and Experience Some of my skills are mentioned below:HTML5, CSS, Bootstrap Lisää

39 € EUR 1 päivässä
(4 arvostelua)
2.8
23 € EUR 1 päivässä
(5 arvostelua)
2.7
abubakar4248

Hi I am a professional software engineer I have +3 years experience in this field I have lots of expertise in database development using SQL server, MySQL and Oracle I will provide quality work according to your requir Lisää

10 € EUR 1 päivässä
(2 arvostelua)
2.2
Lultu

A simple join should do Relevant Skills and Experience SQL, MySQL, php Proposed Milestones €14 EUR - On completion Hope to chat

14 € EUR 1 päivässä
(5 arvostelua)
2.4
24 € EUR 1 päivässä
(4 arvostelua)
2.4
laxmanpatel46

able to stat and finished now Relevant Skills and Experience php ,sql Proposed Milestones €23 EUR - for more details conatct please tahnks

23 € EUR 1 päivässä
(4 arvostelua)
2.1
ahmeddarwish123

Hello I will do it in a day It's a piece of cake for me. I am [url removed, login to view] contact me. Thanks Relevant Skills and Experience Database Administration, Database Programming, MySQL, SQL Proposed Milestones €23 EUR - i Lisää

23 € EUR 1 päivässä
(1 arvostelu)
1.5