sql stringlengths 6 1.05M |
|---|
/*
Count all books
*/
SELECT SUM(1) as sum FROM books |
/**
select * from data.transaction_lines order by date_updated desc;
select * from data.transactions order by date_updated desc;
**/
-- The following to integration-test incremental tx data pipeline
DECLARE @now datetime2;
SELECT @now = GETUTCDATE();
DECLARE @tx_guid_mod UNIQUEIDENTIFIER,
@tx_item_guid... |
<filename>facebook_ads_schema.sql
-- This is the DB schema ad_observatory_api_backend.
-- Note: clustering, topic modelling, ad type classfication implementations are not provided in this repo.
CREATE TABLE pages (
page_id bigint NOT NULL,
page_name character varying NOT NULL,
last_modified_time timestamp with t... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Mar 21, 2022 at 12:40 AM
-- Server version: 10.4.22-MariaDB
-- PHP Version: 8.0.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
-- MySQL dump 10.13 Distrib 8.0.21, for Linux (x86_64)
--
-- Host: localhost Database: propchange
-- ------------------------------------------------------
-- Server version 8.0.21
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
... |
<gh_stars>0
INSERT INTO tipo_reporte_paac (idtipo_reporte_paac,nombre) VALUES ('1','R-PAAC');
INSERT INTO tipo_reporte_paac (idtipo_reporte_paac,nombre) VALUES ('2','R-PAAC Complementario');
INSERT INTO tipo_reporte_cn (idtipo_reporte_cn,nombre) VALUES ('1','R-CN Anual');
INSERT INTO tipo_reporte_cn (idtipo_reporte_cn,... |
<reponame>hakanatabas/TurkPos-Sanal-Pos-Uygulamasi-Prestashop-Modulu<gh_stars>1-10
CREATE TABLE IF NOT EXISTS @TABLE_NAME@
(
ID BIGINT PRIMARY KEY NOT NULL AUTO_INCREMENT,
error_code SMALLINT,
error_msg VARCHAR (1024
),
guid VARCHAR (255
) NOT NULL,
cart_id VARCHAR (50
) NOT NULL,
pos_id INT NOT NULL,
proce... |
-- This file should undo anything in `up.sql`
DROP INDEX room_backend_id;
DROP INDEX rtc_room_id;
|
<filename>DatabaseFiles/Views/v_Autopilot_AadInfo.sql<gh_stars>1-10
USE [Intune];
GO
SET NOCOUNT ON;
/***************************************************************************************************************************
Object: dbo.v_Autopilot_AadInfo
History:
Date Version Author N... |
-- file:json_encoding.sql ln:39 expect:true
SELECT '"\u00"'::jsonb
|
-- file:timestamptz.sql ln:272 expect:true
INSERT INTO TIMESTAMPTZ_TST VALUES(2, 'Sat Mar 12 23:58:48 10000 IST')
|
-- file:interval.sql ln:179 expect:true
SELECT interval '6' second
|
CREATE SCHEMA "test-schema";
create table "test-schema".small_table ("id" int not null);
|
<filename>backend/de.metas.contracts/src/main/sql/postgresql/system/50-de.metas.contracts/5614050_cli_gh11914_newAsyncBatchType.sql
-- 2021-11-17T11:45:13.910Z
-- URL zum Konzept
INSERT INTO C_Async_Batch_Type (AD_Client_ID,AD_Org_ID,C_Async_Batch_Type_ID,Created,CreatedBy,InternalName,IsActive,NotificationType,SkipTi... |
<gh_stars>0
alter table server_node add column async_bootstrap_start datetime;
alter table server_node add column async_install_start datetime;
drop table pool_event_model; |
<reponame>svadluri/course-dbt
{{
config(
materialized='table'
)
}}
SELECT
sto.order_id,
stpr.discount as promo_discount,
sto.user_id,
sto.address_id,
sto.created_at as order_created_at,
sto.order_cost,
sto.shipping_cost,
sto.order_total,
sto.tracking_id,
sto.shipping_se... |
<reponame>sergiomt/bulkmailer<gh_stars>0
ALTER TABLE k_campaigns ADD CONSTRAINT f1_campaign FOREIGN KEY (gu_workarea) REFERENCES k_workareas (gu_workarea);
ALTER TABLE k_oportunities ADD CONSTRAINT f4_oportunities FOREIGN KEY (gu_campaign) REFERENCES k_campaigns(gu_campaign);
ALTER TABLE k_x_campaign_lists ADD CO... |
DROP KEYSPACE IF EXISTS clientagents;
CREATE KEYSPACE clientagents
WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };
USE clientagents;
CREATE TABLE states(
aid text PRIMARY KEY,
state text
); |
CREATE TABLE click (
id bigint NOT NULL,
link_id bigint NULL,
visit_date date NULL,
visit_day_of_month smallint NOT NULL,
visit_day_of_week smallint NOT NULL,
visit_hour smallint NOT NULL,
visit_month smallint NOT NULL,
visit_timestamp timestamp NULL,
visitor_id bigint NULL,
user_id bigint NULL,
i... |
-- Begin the transaction
BEGIN;
-- Add dropped columns
ALTER TABLE peers
ADD COLUMN multi_addresses VARCHAR(255) ARRAY;
ALTER TABLE peers
ADD COLUMN old_multi_addresses VARCHAR(255) ARRAY;
-- Migrate multi addresses back to peer
UPDATE peers
SET multi_addresses=subquery.maddrs
FROM (SELECT pma.peer_id AS "pee... |
<gh_stars>10-100
-- requests per second in each minute over the last 5 minutes
SELECT
time_bucket('1 minute', start_time) as time,
count(*) / 60.0 as req_per_sec
FROM ps_trace.span s
WHERE s.start_time >= now() - interval '5 minutes'
AND parent_span_id is null -- just the root spans
GROUP BY 1
ORDER BY 1
;
--... |
-- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Feb 28, 2016 at 11:15 PM
-- Server version: 5.5.47-0ubuntu0.14.04.1
-- PHP Version: 5.5.9-1ubuntu4.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... |
drop table if exists [test_inbox_info];
;set level 515
CREATE CLASS [test_inbox_info];
ALTER CLASS [test_inbox_info] ADD ATTRIBUTE
[test_id] integer NOT NULL,
[usid] integer NOT NULL,
[rtype] character(5) NOT NULL,
[iflag] character(1),
[mtype] character(5) NOT NULL;
ALTER CLASS ... |
-- @testpoint: opengauss关键字lower(非保留),作为函数名,部分测试点合理报错
--关键字不带引号-成功
drop function if exists lower(i integer);
create function lower(i integer)
returns integer
as $$
begin
return i+1;
end;
$$ language plpgsql;
/
drop function if exists lower(i integer);
--关键字带双引号-成功
drop function if exists "lower"(i integer);
create ... |
START TRANSACTION;
DROP INDEX IF EXISTS identity__name__bearer__uniq;
CREATE UNIQUE INDEX identity__account__provider__bearer__uniq ON identity (
account, provider DESC
) WHERE deleted_on IS NULL AND type = 'bearer';
COMMIT;
|
-- MySQL dump 10.13 Distrib 5.7.9, for linux-glibc2.5 (x86_64)
--
-- Host: localhost Database: yuva
-- ------------------------------------------------------
-- Server version 5.5.47-0ubuntu0.14.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACT... |
<filename>schema.sql
-- if this database exists, delete it --
DROP DATABASE IF EXISTS top_songsDB;
-- create a database called top_songsDB --
CREATE database top_songsDB;
-- use the database called top_songsDB --
USE top_songsDB;
-- create a table called top5000 that matches the properties to the data in .csv file --
C... |
<reponame>andangdj/word_scrambler
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 10.1.36-MariaDB - mariadb.org binary distribution
-- Server OS: Win32
-- HeidiSQL Version: 9.5.0.5280
-- --------------... |
<filename>ingest/asn/load.sql
-- This scripts loads a file of ASN transactions without storing duplicate
-- transactions
BEGIN;
-- Create temporary loading table
CREATE TABLE {schema_prefix}_staging.asn_tmp AS
SELECT * FROM {schema_prefix}_staging.asn
WHERE 0=1;
-- Load data into temporary loading table
SET DATESTYLE... |
USE [PreactorProd]
GO
/****** Object: View [dbo].[View_EquipmentNames] Script Date: 12/19/2017 11:41:01 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE View [dbo].[View_EquipmentNames] as
Select equips.equip_name as EquipmentName,
equips.equip_id as EquipmentId,
equips.equip_superior as Equi... |
USE T20;
# CS-19732 [PROD][MP3][HPA]: Enable "Mini App" Support for the HPA Enterprise
# Bind Mini Apps platform to hpit tenant on Prod
INSERT IGNORE INTO `dp_enterprise_platforms` (`enterprise_id`, `platform_id`) VALUES
('88fc7b87-85aa-11e4-82d0-d8d385e16fb6', '8'); |
<reponame>udin9951/barang
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.7.24 - MySQL Community Server (GPL)
-- Server OS: Win64
-- HeidiSQL Version: 11.1.0.6116
-- ---------------------------------... |
<reponame>lgcarrier/AFW
SET DEFINE OFF;
ALTER TABLE AFW_17_PROFL_COURL ADD (
CONSTRAINT AFW_17_PROFL_COURL_PK
PRIMARY KEY
(SEQNC)
ENABLE VALIDATE)
/
|
<filename>5.2.3/Database/Indexes/AFW_01_MESG_TRADC_APEX_FK1.sql
SET DEFINE OFF;
CREATE INDEX AFW_01_MESG_TRADC_APEX_FK1 ON AFW_01_MESG_TRADC_APEX
(REF_LANG)
LOGGING
/
|
SELECT
t.activity_desc As TaskDescription
, Cast(td.start_date As Date) As StartDate
, Cast(td.target_complete_date As Date) As DueDate
, '' As TypeDescription --tt.category_desc
, '' As PercentComplete
, '' As PriorityCode
, t.activity_id As TaskID
, '' As TaskSeqNum
, Case td.completed_flag When 'Y' Then 1... |
-- 1. 每个员工的所有信息
SELECT * FROM EMPLOYEES
-- 2. 每个人的部门编号,姓名,薪水
SELECT DEPARTMENT_ID,LAST_NAME,SALARY FROM EMPLOYEES
-- 3. 每个人的年薪
SELECT SALARY*12 FROM EMPLOYEES
-- 4. 求每个人的年薪,列的别名:“年薪”
SELECT SALARY*12 "年薪" FROM EMPLOYEES
-- 5. 求 10 这个部门的所有员工
SELECT * FROM EMPLOYEES WHERE DEPARTMENT_ID=10
-- 6. 求名字是 KING 的这个人的信息
SELECT *... |
<gh_stars>1-10
DROP FUNCTION Enqueue(json);
DROP FUNCTION Dequeue(int, int);
DROP FUNCTION Commit(json);
DROP FUNCTION Clear();
DROP TYPE EnqueueItemType;
DROP TYPE DequeueItemType;
DROP TYPE CommitItemType;
DROP TABLE Queue;
DROP TABLE Setting;
|
BEGIN;
CREATE SCHEMA "APP_META";
CREATE TABLE IF NOT EXISTS "APP_META"."DB_UPDATE" (
"currentVersion" INT NOT NULL
);
INSERT INTO "APP_META"."DB_UPDATE" VALUES (0);
COMMIT;
|
<gh_stars>1-10
CREATE TABLE `live_room` (
`id` int(10) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
`name` varchar(50) NOT NULL COMMENT '直播间名称',
`description` varchar(200) NOT NULL DEFAULT '' COMMENT '直播间描述',
`status` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '直播间开启状态',
`created_at` int(10) UNSIGNED N... |
<gh_stars>1-10
UPDATE "Quiz"
SET isPublished = TRUE,
publishedTimestamp = NOW()
WHERE owner = ${userId}
AND id = ${id}
AND isPublished = FALSE
|
WITH source as (
SELECT *
FROM {{ source('greenhouse', 'eeoc_responses') }}
), renamed as (
SELECT
--key
application_id::NUMBER AS application_id,
--info
status::varchar AS candidate_status,
race::varchar AS c... |
<filename>src/test/resources/sql/select/153b018a.sql
-- file:create_table_like.sql ln:144 expect:true
SELECT oid FROM like_test
|
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.1.63-community - MySQL Community Server (GPL)
-- Server OS: Win64
-- HeidiSQL version: 7.0.0.4053
-- Date/time: 2012-10-14 17:59:20
... |
SELECT * FROM Data
/*% if (!String.IsNullOrEmpty(type)) { */
WHERE Type = /*@ type */'A'
/*% } */
/*% if (!String.IsNullOrEmpty(order)) { */
ORDER BY /*# order */Id
/*% } */
|
<filename>pokedex.sql
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
--
CREATE EXTENSI... |
<gh_stars>0
select int64_4 from nulls3 where int64_4 > 49000000000
50000000000
|
DROP TABLE IF EXISTS user
DROP TABLE IF EXISTS account
DROP TABLE IF EXISTS check
DROP TABLE IF EXISTS message
CREATE TABLE user (id VARCHAR(64) PRIMARY KEY, name VARCHAR(256), email VARCHAR(256), username VARCHAR(64), password VARCHAR(64), is_admin BOOLEAN)
CREATE TABLE account (id VARCHAR(64) PRIMARY KEY, amount NUM... |
<filename>export/harpege/har_agents.sql
set lines 500
set pages 0
set feed off;
set define off;
REM Extraction sur fichier
set termout off
spool har_agents.lst;
set lines 500
set pages 0
select
I.No_Individu||'#'||
I.C_Civilite||'#'||
REPLACE(I.Nom_Usuel,'''','\''')||'#'||
REPLACE(I.Prenom,'''','\... |
/*
* Copyright (c) 2016 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... |
<reponame>cvielma/simulation-models-system
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
--
CREATE EXTENSIO... |
INSERT INTO oauth_client_details (
client_id,
client_secret,
scope,
resource_ids,
authorized_grant_types,
authorities
)
VALUES (
'testClient',
'testClientSecret',
'read_data_points,write_data_points,delete_data_points',
'dataPoints',
'authorization_code,implicit,password,refresh_token',
'ROLE_CL... |
use assetmonitoring;
select * from assets;
|
select * from message_delivery_comp_vw |
<filename>examples/demonstration/sqlite/select.sql
SELECT id, a, b FROM A; |
-- @testpoint: opengauss关键字exclude(非保留),作为游标名,部分测试点合理报错
--前置条件
drop table if exists exclude_test cascade;
create table exclude_test(cid int,fid int);
--关键字不带引号-成功
start transaction;
cursor exclude for select * from exclude_test order by 1;
close exclude;
end;
--关键字带双引号-成功
start transaction;
cursor "exclude" for sele... |
<reponame>yuetsin/SE-223<gh_stars>0
create database one;
use one;
/*==============================================================*/
/* DBMS name: MySQL 5.0 */
/* Created on: 2019/5/8 16:04:16 */
/*===================================================... |
INSERT INTO department (name)
VALUES
('Accounting'),
('Creative'),
('Strategy'),
('Human Resources'),
('Administration'),
('Sales'),
('Digital');
INSERT INTO employee_role (title, salary, department_id)
VALUES
('Sr. Accounting', 75000, 1),
('Jr. Accounting', 50000, 1),
('Copywriter', 50000, 2),
('Associate Creative D... |
CREATE TABLE IF NOT EXISTS users(
user_id serial PRIMARY KEY,
name VARCHAR (50) UNIQUE NOT NULL
);
|
INSERT INTO `base_process` (`id`, `service_id`, `pre_con_bp`, `next_bp_id`, `unit_id`, `roles`, `generate_form_pembayaran`, `generate_form_perizinan`, `is_start`, `is_checkpoint`, `is_finish`, `is_display`, `display_text`, `name`, `description`) VALUES
(38, 6, '', '39', 33, '9', NULL, NULL, 1, 1, NULL, 1, 'Penerimaa... |
-- phpMyAdmin SQL Dump
-- version 4.8.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 05, 2019 at 02:30 PM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 5.6.35
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
CREATE TABLE accounts (
id TEXT NOT NULL,
thirdParty TEXT NOT NULL REFERENCES thirdParties (id) ON DELETE RESTRICT ON UPDATE CASCADE,
insertedAt TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
modifiedAt TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
version INTEGER NOT NULL DEFAULT 0,
CONSTRAINT a2 PRIMARY KEY (id, thi... |
<filename>src/sql/clean_tables.sql
drop table if exists trabajo.nodos;
create table trabajo.nodos as(
select
substring(id_nodo from '[^.]*')::int as nodo,
lat, lon
from raw.nodos_aux
);
comment on table trabajo.nodos is 'Catálogo de nodos y coordenadas sin comillas en id_nodo';
drop table if exists ra... |
insert into postal_code(id, code)
values(UUID_TO_BIN('c922f50f-9e70-4785-8424-524c50102620'), '20000');
insert into postal_code(id, code)
values(UUID_TO_BIN('47d72608-a864-493a-8d2c-473b057d1793'), '20010');
insert into postal_code(i... |
<filename>bin/sql/version.2.sql
-- Change collation to have case insensitive search
ALTER TABLE `movie` CHANGE `title` `title` VARCHAR( 512 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `user` CHANGE `nickname` `nickname` VARCHAR( 32 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTE... |
<gh_stars>1-10
USE CursoSQL
GO
BEGIN
IF NOT EXISTS (SELECT * FROM sysobjects
WHERE NAME = 'Veiculo'
AND xtype='U')
CREATE TABLE Veiculo (
IdVeiculo INT NOT NULL IDENTITY (1,1),
IdFuncionario INT NOT NULL,
Modelo VARCHAR (45) NOT NULL DEFAULT '',
Placa VARCHAR (10) D... |
<reponame>jdm7dv/Zenity
ALTER TABLE [Core].[Resource] ADD [c7a2b2e1-49b3-4ca0-a1a1-6e7b114007e4] nvarchar(256) NULL
GO
ALTER TABLE [Core].[Resource] ADD [3d82f5e2-b84a-4422-a0be-82317ad5059f] nvarchar(256) NULL
GO
ALTER TABLE [Core].[Resource] ADD [95d6858e-6294-4572-8686-c2c2c8dddd17] nvarchar(256) NULL
GO
ALTER TABLE... |
CREATE TYPE "ApiWebsite" AS (
req "AdminRequest",
csrf_token UUID,
website_title TEXT,
website_subtitle TEXT,
copyright_owner TEXT
);
CREATE OR REPLACE FUNCTION aha_p_website(
r "ApiWebsite"
)
RETURNS VOID
LANGUAGE PLPGSQL
VOLATILE
CALLED ON NULL INPUT
PARALLEL UNSAFE
AS $$
DECLARE
d... |
-- file:advisory_lock.sql ln:98 expect:true
SELECT
pg_advisory_xact_lock(1), pg_advisory_xact_lock(1),
pg_advisory_xact_lock_shared(2), pg_advisory_xact_lock_shared(2),
pg_advisory_xact_lock(1, 1), pg_advisory_xact_lock(1, 1),
pg_advisory_xact_lock_shared(2, 2), pg_advisory_xact_lock_shared(2, 2)
|
<reponame>Shuttl-Tech/antlr_psql
-- file:object_address.sql ln:78 expect:false
args text[]
|
<gh_stars>1-10
BEGIN;
CREATE TABLE IF NOT EXISTS articles (
id SERIAL PRIMARY KEY,
title TEXT NOT NULL,
body TEXT NOT NULL,
description TEXT,
slug VARCHAR(255) NOT NULL UNIQUE,
author_id INT NOT NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
updated_at TIMESTAMPTZ NOT NULL DEFAUL... |
create table shortened_urls (
id text primary key,
url text not null
); |
<gh_stars>1000+
--DROP VIEW IF EXISTS RV_Printing_Bericht_List_Per_Print_Job;
create or replace view RV_Printing_Bericht_List_Per_Print_Job as
SELECT
(d.name || '-' :: bpchar ||i.DocumentNo) as documentNo
, u.lastName, u.firstName, bp.companyname
, i.GrandTotal
, pj.C_Print_Job_ID
, (pj.C_Print_Job_ID || '-' :: bpc... |
<reponame>dram/metasfresh<filename>backend/de.metas.marketing/serialletter/src/main/sql/postgresql/system/92-de.metas.marketing.serialletter/5494880_sys_gh4153_AddEntityType.sql
-- 2018-05-31T12:25:57.914
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_EntityType (AD_Client_ID,AD_Entity... |
<reponame>sqitchers/sqitch-sqlite-intro
-- Revert userflips
BEGIN;
DROP VIEW userflips;
COMMIT;
|
/*
Navicat MySQL Data Transfer
Source Server : demo
Source Server Version : 50540
Source Host : localhost:3306
Source Database : crm
Target Server Type : MYSQL
Target Server Version : 50540
File Encoding : 65001
Date: 2016-12-25 16:47:40
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------... |
<reponame>srcarter3/awips2<filename>edexOsgi/build.edex/opt/db/ddl/migrated/fxatext.sql
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restri... |
<reponame>msottana/GruppoArtisticoSpineaServer
-- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Lug 04, 2015 alle 10:27
-- Versione del server: 5.6.21
-- PHP Version: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @O... |
{{
config(
enabled=True
)
}}
with pit as (
select *, row_number() over (partition by customer_pk order by sat1_effective_from desc, sat2_effective_from desc) as row_num
from {{ref('pit_customer')}}
where sat1_effective_from <= '{{ var("date_for_pit", "2021-12-06") }}'::timestamp
o... |
# --- !Ups
CREATE TABLE "invoice" (
"id" BIGSERIAL PRIMARY KEY,
"issuer_id" VARCHAR NOT NULL,
"date_issued" TIMESTAMP NOT NULL,
"date_due" TIMESTAMP NOT NULL,
"is_paid" BOOLEAN NOT NULL DEFAULT FALSE,
"is_accepted" BOOLEAN NOT NULL DEFAULT FALSE,
"amount" NUMERIC NOT NULL,
"currency_code" VARCHAR NOT N... |
use mansi
create table da3(EmployeeId int, hiredate varchar(20))
insert into da3 values(1, 'July-1996')
insert into da3 values(2, 'February-1997')
insert into da3 values(3, 'December-1997')
insert into da3 values(4, 'January-1998')
insert into da3 values(5, 'January-1998')
insert into da3 values(6, 'January-1998')
inse... |
<reponame>GunarakulanGunaretnam/the-project-aisle-hate-speech-analyzer
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 11, 2021 at 03:07 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 8.0.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSAC... |
<reponame>boost-entropy-repos-org/lucy-web
-- ### Creating Table: species_distribution_code ### --
CREATE TABLE species_distribution_code ();
ALTER TABLE species_distribution_code ADD COLUMN species_distribution_code_id INT NOT NULL PRIMARY KEY;
ALTER TABLE species_distribution_code ADD COLUMN description VAR... |
DROP TABLE IF EXISTS comments;
|
select title, akas
from gcp.gcp_logging_metric
where name = '{{resourceName}}' |
<filename>employee.sql
-- phpMyAdmin SQL Dump
-- version 3.5.2.2
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 20, 2017 at 09:16 PM
-- Server version: 5.5.27
-- PHP Version: 5.4.7
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET... |
-- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 23, 2015 at 08:15 AM
-- Server version: 5.6.20
-- PHP Version: 5.5.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... |
USE TelerikAcademy
SELECT Salary
FROM Employees
WHERE Salary BETWEEN 20000 AND 30000 |
CREATE TABLE Tag (
TagName text PRIMARY KEY,
ScriptName text NOT NULL
);
CREATE TABLE Event (
EventID integer PRIMARY KEY AUTOINCREMENT,
EventTitle text,
EventDescription text
);
CREATE TABLE Terrain (
TagName text PRIMARY KEY,
FOREIGN KEY (TagName) REFERENCES Tag(TagName)
);
CREATE TABLE Landmass (
TagName ... |
<gh_stars>0
# Table
CREATE TABLE point_2d
(
x INT,
y INT
);
INSERT INTO point_2d ( x , y )
VALUES
(-1, -1),
(0, 0),
(-1, -2);
# Solution 1(self, correct)
SELECT
ROUND(MIN(SQRT(POWER((F.x - S.x), 2) + POWER((F.y - S.y), 2))),2) AS shortest
FROM point_2d F, point_2d S
WHERE (F.x, F.y) != (S.x,... |
<reponame>blommish/familie-ef-sak
ALTER TABLE barn ADD COLUMN skal_bo_hos_soker VARCHAR; |
-- phpMyAdmin SQL Dump
-- version 4.6.6
-- https://www.phpmyadmin.net/
--
-- Anamakine: localhost
-- Üretim Zamanı: 10 Kas 2018, 02:34:17
-- Sunucu sürümü: 5.7.17-log
-- PHP Sürümü: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ... |
SELECT
autodebit.id,
autodebit.amount,
autodebit.dayofmonth,
autodebit.description,
envelopes.id AS envid,
envelopes.today
FROM autodebit
INNER JOIN envelopes ON autodebit .envelopeid = envelopes.id
WHERE envelopes.today = autodebit.dayofmonth
; |
USE devcamp_sql_project;
-- Add Courses
INSERT INTO courses(courses_name)
VALUES ('React Basics');
INSERT INTO courses(courses_name)
VALUES ('RPG');
INSERT INTO courses(courses_name)
VALUES ('Advanced C++');
INSERT INTO courses(courses_name)
VALUES ('Punch Cards 101');
INSERT INTO courses(courses_name)
VALUES ('C... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Jan 04, 2018 at 05:55 PM
-- Server version: 5.7.19
-- PHP Version: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... |
USE DependencyAnalysis
GO
DROP TABLE Dependencies
GO
CREATE TABLE Dependencies
(
[id] INT IDENTITY,
[source_entity_name] NVARCHAR(257),
[referenced_entity_name] NVARCHAR(257),
[referenced_minor_name] NVARCHAR(257) NULL,
[referenced_class_desc] NVARCHAR(257),
[is_updated] BIT,
[is_selected] BIT
);
GO
DROP TABL... |
-- MySQL dump 10.13 Distrib 5.6.23, for osx10.8 (x86_64)
--
-- Host: localhost Database: bbb_te
-- ------------------------------------------------------
-- Server version 5.6.23
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*... |
-- phpMyAdmin SQL Dump
-- version 4.1.6
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 26, 2017 at 04:12 PM
-- Server version: 5.5.36
-- PHP Version: 5.4.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... |
<reponame>AIPB07/soccer-stats-scraper
CREATE TABLE `goals` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`PlayerName` varchar(45) NOT NULL,
`Opponent` varchar(24) NOT NULL,
`Time` int(11) NOT NULL,
`Home_Away` char(4) NOT NULL,
`Gameweek` int(11) NOT NULL,
`Assist` varchar(45) DEFAULT NULL,
PRIMARY KEY (`ID`)... |
<gh_stars>1-10
CREATE TABLE [dbo].[Bans] (
[BanEmail] NVARCHAR (256) NULL,
[BanIP] NVARCHAR (16) NULL,
[BanKDName] NVARCHAR (24) NULL,
[BanRulerName] NVARCHAR (24) NULL,
[BanAccount] NVARCHAR (16) NULL
);
|
<filename>eurocup/schema/create_schema.sql<gh_stars>10-100
begin;
drop schema if exists eurocup cascade;
create schema eurocup;
commit;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.