Ok, this is the SQL you want: SELECT b.ilha, a.max_subscriber_per_lac_semanal FROM siemens.semanal_subscriber_per_lac AS a LEFT JOIN geral.lac AS b ON (a.lac = b.lac) ORDER BY b.ilha
On Monday, April 29, 2013 6:18:39 PM UTC-4, Alex wrote: > > Yes, I have 2 tables in database. > > 1 table = geral.lac > 2 table= siemens.semanal..... > > > Attached please > > > > 2013/4/29 Irina lima <[email protected] <javascript:>> > >> Attached please find what I want. >> >> From the table with the data base, I want to make the graphs above with >> the codes I have sent to you earlier” >> >> SELECT COALESCE(a.lac, b.ilha) as lac, a.max_subscriber_per_lac_semanal >> FROM siemens.semanal_subscriber_per_lac AS a >> >> FULL JOIN geral.lac AS b ON (a.lac = 'b.ilha') >> >> ORDER BY a.lac,b.ilha; >> >> ERROR: invalid input syntax for integer: "b.ilha" >> >> ilha is varchar and lac is integer >> >> >> >> >> 2013/4/29 asgallant <[email protected] <javascript:>> >> >>> What is it you would like to have for the x-axis values? >>> >>> >>> On Monday, April 29, 2013 2:11:56 PM UTC-4, Alex wrote: >>> >>>> Also if I wanted to change the X-Axis as I do. Do I use names with or >>>> without values ? >>>> >>>> >>>> 2013/4/29 Alex <[email protected]> >>>> >>>> >>>>> THANKS :):):):):):):):) >>>>> >>>>> Segunda-feira, 29 de Abril de 2013 16:28:17 UTC-1, asgallant escreveu: >>>>> >>>>>> At a guess, I would say that the axis label problem is due to the SQL >>>>>> only returning values start_time values from the first table. You can >>>>>> try >>>>>> modifying the select again like this to fix it: >>>>>> >>>>>> SELECT >>>>>> COALESCE(a.start_time, b.start_time, c.start_time, d.start_time) AS >>>>>> start_time, >>>>>> a.media_cssr_cs_2g_quinzenal, >>>>>> b.media_cssr_cs_3g_quinzenal, >>>>>> c.media_cssr_ps_2g_quinzenal, >>>>>> d.media_cssr_ps_3g_quinzenal >>>>>> >>>>>> On Monday, April 29, 2013 1:08:47 PM UTC-4, asgallant wrote: >>>>>>> >>>>>>> Open the chart in a browser, view the source and post it here so I >>>>>>> can see what might be the problem. >>>>>>> >>>>>>> On Monday, April 29, 2013 12:53:00 PM UTC-4, Alex wrote: >>>>>>>> >>>>>>>> *Thank* *you* *very* *much*, now it's ok :):):):) >>>>>>>> >>>>>>>> I modified the code to: >>>>>>>> >>>>>>>> $queryData =pg_query("SELECT a.start_time, >>>>>>>> a.media_cssr_cs_2g_quinzenal, b.media_cssr_cs_3g_quinzenal, >>>>>>>> c.media_cssr_ps_2g_quinzenal, d.media_cssr_ps_3g_quinzenal >>>>>>>> FROM huawei.quinzenal_cssr_cs_2g AS a >>>>>>>> FULL JOIN huawei.quinzenal_cssr_cs_3g AS b ON (a.start_time = >>>>>>>> b.start_time) >>>>>>>> FULL JOIN huawei.quinzenal_cssr_ps_2g AS c ON (a.start_time = >>>>>>>> c.start_time) >>>>>>>> FULL JOIN huawei.quinzenal_cssr_ps_3g AS d ON (a.start_time = >>>>>>>> d.start_time) >>>>>>>> ORDER BY a.start_time,b.start_time,c.**st**art_time,d.start_time"); >>>>>>>> >>>>>>>> but still have a problem with the X axis. >>>>>>>> I will analyze the problem and I will tel you something. >>>>>>>> >>>>>>>> knows how to work with MACRO excel? >>>>>>>> >>>>>>>> >>>>>>>> thanks again :D :D >>>>>>>> >>>>>>>> >>>>>>>> 2013/4/29 asgallant <[email protected]> >>>>>>>> >>>>>>>>> Ok, looks like PostgreSQL require that table a field is from in a >>>>>>>>> join statement be specified. Modify the "select" line to this: >>>>>>>>> >>>>>>>>> SELECT a.start_time, a.media_cssr_cs_2g_quinzenal, >>>>>>>>> b.media_cssr_cs_3g_quinzenal, c.media_cssr_ps_2g_quinzenal, >>>>>>>>> d.media_cssr_ps_3g_quinzenal >>>>>>>>> >>>>>>>>> >>>>>>>>> On Monday, April 29, 2013 5:58:54 AM UTC-4, Alex wrote: >>>>>>>>>> >>>>>>>>>> Hi >>>>>>>>>> >>>>>>>>>> Thanks, but the code did not work. >>>>>>>>>> In axeno i send you the error. >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Sexta-feira, 26 de Abril de 2013 15:52:07 UTC-1, Alex escreveu: >>>>>>>>>>> >>>>>>>>>>> Hello >>>>>>>>>>> A need a help . >>>>>>>>>>> My Code don't work. I don't now why. >>>>>>>>>>> >>>>>>>>>>> <!--Load the AJAX API--> >>>>>>>>>>> <script type="text/javascript" src="https://www.google.com/* >>>>>>>>>>> *js****api <https://www.google.com/jsapi>"></script> >>>>>>>>>>> <script type="text/javascript" src="http://ajax.googleapis.* >>>>>>>>>>> *co****m/ajax/libs/jquery/1.8.2/**jquer****y.min.js<http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js> >>>>>>>>>>> "></script> >>>>>>>>>>> <script type="text/javascript"> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> google.load('visualization', '1', >>>>>>>>>>> {'packages':['coreChart']}); >>>>>>>>>>> >>>>>>>>>>> // Set a callback to run when the Google Visualization API >>>>>>>>>>> is loaded. >>>>>>>>>>> google.setOnLoadCallback(**drawC****hart); >>>>>>>>>>> >>>>>>>>>>> function drawChart() { >>>>>>>>>>> >>>>>>>>>>> // Create our data table out of JSON data loaded from >>>>>>>>>>> server. >>>>>>>>>>> var data = new google.visualization.**DataTable****(); >>>>>>>>>>> data.addColumn('string', 'start_time'); >>>>>>>>>>> data.addColumn('number', 'CSSR CS 2G'); >>>>>>>>>>> data.addColumn('number', 'CSSR CS 3G'); >>>>>>>>>>> data.addColumn('number', 'CSSR PS 2G'); >>>>>>>>>>> data.addColumn('number', 'CSSR PS 3G'); >>>>>>>>>>> data.addRows([ >>>>>>>>>>> [(<?=$jsonTable?>),'CSSR CS 2G'], >>>>>>>>>>> [(<?=$jsonTable1?>),'CSSR CS 3G'], >>>>>>>>>>> [(<?=$jsonTable2?>),'CSSR PS 2G'], >>>>>>>>>>> [(<?=$jsonTable3?>),'CSSR PS 3G'] >>>>>>>>>>> ]); >>>>>>>>>>> >>>>>>>>>>> var options = { >>>>>>>>>>> title: 'Acessibility', >>>>>>>>>>> //chartArea: {width: 0, top: 30, left: 140, width: >>>>>>>>>>> "50%", height: "50%"}, >>>>>>>>>>> //backgroundColor: 'yellow', //cor do fundo do grafico >>>>>>>>>>> //axisTitlesPosition: 'out', >>>>>>>>>>> //vAxis: {title: "Valor"}, //legenda horizontal >>>>>>>>>>> //hAxis: {title: "Data"}, //legenda vertical >>>>>>>>>>> //colors: ['#AA00CC'], // cor da linha do gráfico >>>>>>>>>>> //is3D: 'True', >>>>>>>>>>> width: 1500, //largura >>>>>>>>>>> height: 400, //Altura >>>>>>>>>>> }; >>>>>>>>>>> >>>>>>>>>>> // Instantiate and draw our chart, passing in some options. >>>>>>>>>>> var chart = new google.visualization.**LineChart**** >>>>>>>>>>> (document.**getElementById('**graf**31')); >>>>>>>>>>> >>>>>>>>>>> chart.draw(data,options); >>>>>>>>>>> >>>>>>>>>>> } >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> -- >>>>>>>>> You received this message because you are subscribed to a topic in >>>>>>>>> the Google Groups "Google Visualization API" group. >>>>>>>>> To unsubscribe from this topic, visit https://groups.google.com/d/ >>>>>>>>> **to**pic/google-visualization-**api/**gQU4-GDivoE/unsubscribe?** >>>>>>>>> hl=en<https://groups.google.com/d/topic/google-visualization-api/gQU4-GDivoE/unsubscribe?hl=en> >>>>>>>>> . >>>>>>>>> To unsubscribe from this group and all its topics, send an email >>>>>>>>> to google-visualization-api+**unsub**[email protected]. >>>>>>>>> To post to this group, send email to google-visua...@googlegroups. >>>>>>>>> **c**om. >>>>>>>>> Visit this group at http://groups.google.com/**group** >>>>>>>>> /google-visualization-**api?hl=**en<http://groups.google.com/group/google-visualization-api?hl=en> >>>>>>>>> . >>>>>>>>> For more options, visit https://groups.google.com/**grou** >>>>>>>>> ps/opt_out <https://groups.google.com/groups/opt_out>. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Cumprimentos. >>>>>>>> Irina Lima >>>>>>>> >>>>>>> -- >>>>> You received this message because you are subscribed to a topic in the >>>>> Google Groups "Google Visualization API" group. >>>>> To unsubscribe from this topic, visit https://groups.google.com/d/** >>>>> topic/google-visualization-**api/gQU4-GDivoE/unsubscribe?**hl=en<https://groups.google.com/d/topic/google-visualization-api/gQU4-GDivoE/unsubscribe?hl=en> >>>>> . >>>>> To unsubscribe from this group and all its topics, send an email to >>>>> google-visualization-api+**[email protected]. >>>>> To post to this group, send email to google-visua...@** >>>>> googlegroups.com. >>>>> Visit this group at http://groups.google.com/** >>>>> group/google-visualization-**api?hl=en<http://groups.google.com/group/google-visualization-api?hl=en> >>>>> . >>>>> For more options, visit >>>>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out> >>>>> . >>>>> >>>>> >>>>> >>>> >>>> >>>> >>>> -- >>>> Cumprimentos. >>>> Irina Lima >>>> >>> -- >>> You received this message because you are subscribed to a topic in the >>> Google Groups "Google Visualization API" group. >>> To unsubscribe from this topic, visit >>> https://groups.google.com/d/topic/google-visualization-api/gQU4-GDivoE/unsubscribe?hl=en >>> . >>> To unsubscribe from this group and all its topics, send an email to >>> [email protected] <javascript:>. >>> To post to this group, send email to >>> [email protected]<javascript:> >>> . >>> Visit this group at >>> http://groups.google.com/group/google-visualization-api?hl=en. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> >> >> >> >> -- >> Cumprimentos. >> Irina Lima >> > > > > -- > Cumprimentos. > Irina Lima > -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-visualization-api?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
