I tried printing two consecutive rows of the same column with MySQLi, but I only print the same value.
$result = $link->query("SELECT id_papers, name, pen FROM Papers, Pens WHERE id_papers = id_pen_papers"); // la consulta no es exactamente...
The case is as follows, I have two related tables in postgres, understand
Urbanization and Houses
in Urbanizacion we have the following data
idurb(PK-NoIncremental,varchar)| nombreurb | calle | idcasas(el campo
idcasas es una FK )
and...
Starting from two tables
lessons
lessons.lessons_id, lessons.lesson_number, lessons.course_id entre otras
and lessons_completed
lessons_completed.lessons_number, lessons_completed.user_id,
lessons_completed.completed
With the...
As the title indicates, I would like to query a Table "Table1" with the results obtained from another Table "Table2"
CONSULTATION 1
To get the data from the Table1
SELECT id FROM box_12.esale_rc WHERE kind=30;
which gives...
This is my problem I want to group by a field which is a result of an annotate, but I can not do it.
from django.db.models import Max, Sum
queryset = queryset.values('period', 'cell').annotate(x=Max('total'))
result = queryset.values('period')...
I'm currently making an export with this Script:
/* FromTable 1:Otrntransaction, 2:OtrnTrnTaxAmount, 3:Marckup */ SELECT '1' AS FromTable, T1.ID_Trn AS IdDiarioTrans, T1.PostingDate AS Fecha, T2.AccountNo AS Folio,...
If we have the following query in the [Adventure Works] cube of the BD AdventureWorksDW2014 :
WITH MEMBER [Measures].[Previo] AS
( [Date].[Calendar].currentmember.PrevMember,[Measures].[Customer Count])
MEMBER [Measures].[Paral...
The following sql code for the compaction of the log:
use My_dabase
go
declare
@arch_log sysname
set @arch_log =(select name FROM SYSFILES
where fileid = '2')
select name from sysfiles
ALTER DATABASE My_database
SET RECOVE...
Good morning everyone, I need help and I do not have an idea
I'm putting together a query for a database, which gives me back a
result (Table on the left) that contains a list of employees, and the
amount that they charged per month. To this...
Good morning everyone
I have the following problem: from the url I pick up a id with which I make a query from which I take out an array. With this array I make another query to get the data I need in another table. The problem comes to me...