sql stringlengths 6 1.05M |
|---|
USE [XSDtoSQL]
GO
INSERT [dbo].[TSpeedRangeType] ([TSpeedRangeTypeId], [Value]) VALUES (1, N'Dontcare')
GO
INSERT [dbo].[TSpeedRangeType] ([TSpeedRangeTypeId], [Value]) VALUES (2, N'Slow')
GO
INSERT [dbo].[TSpeedRangeType] ([TSpeedRangeTypeId], [Value]) VALUES (3, N'Fast')
GO
|
INSERT INTO `demo`.`md_tables` (`md_tables_id`, `tenant_id`, `database_id`, `schema_code`, `md_tables_name`, `md_tables_desc`, `public_flag`, `text_column1`, `text_column2`, `text_column3`, `text_column4`, `text_column5`, `int_column1`, `int_column2`, `int_column3`, `num_column1`, `num_column2`, `num_column3`, `date_co... |
{% macro get_time_slice(date_or_time_expr, slice_length, date_or_time_part, start_or_end) %}
{# Calculates the beginning or end of a “slice” of time,
where the length of the slice is a multiple of a standard unit of time (minute, hour, day, etc.).
This function can be used to calculate the start and en... |
-- drop view ToolChamberView
create view ToolChamberView as
select tc.id as ToolChamberId, tc.factoryId as FactoryToolChamberId, tv.*
from ToolChamber tc WITH (NOLOCK)
join ToolView tv
on (tc.parentTool_id = tv.toolId);
/*
select * from ToolChamberView;
*/ |
<filename>starter-project/macros/generate_schema_name.sql
{% raw -%}
{% macro generate_schema_name(schema_name, node) -%}
{{ generate_schema_name_for_env(schema_name, node) }}
{%- endmacro %}
{%- endraw %}
|
ALTER TABLE `alibaba_acsk_node_pools` DROP COLUMN `min_count`;
ALTER TABLE `alibaba_acsk_node_pools` DROP COLUMN `max_count`;
ALTER TABLE `alibaba_acsk_node_pools` DROP COLUMN `asg_id`;
ALTER TABLE `alibaba_acsk_node_pools` DROP COLUMN `scaling_config_id`;
|
<reponame>Leonard107/repositorio-padrao
--
-- The contents of this file are subject to the license and copyright
-- detailed in the LICENSE and NOTICE files at the root of the source
-- tree and available online at
--
-- http://www.dspace.org/license/
--
------------------------------------------------------
-- DS-270... |
<reponame>polinwei/jwt
-- Temporarily disabling referential constraints
SET FOREIGN_KEY_CHECKS=0;
-- initialize tables
DROP TABLE IF EXISTS `company`;
DROP TABLE IF EXISTS `department`;
DROP TABLE IF EXISTS `user_details`;
CREATE TABLE company
(
id bigint NOT NULL auto_increment,
code VARCHAR(60) NOT NULL... |
CREATE TABLE `lead`(`ID` int NOT NULL AUTO_INCREMENT, `CompanyName` varchar(40) NULL, `Address` varchar(255) NULL, `WhoSpokenToAndWhoIsPersonInCharge` varchar(60) NULL, `TelNoAndEmailAddress` varchar(80) NULL, `RenewalDateOfCurrentContract` date NULL, `DateSeen` date NULL, `Interested` tinyint NULL, `NumberOfBins` int ... |
create table DEMO1
(
id int not null primary key,
name varchar(32) not null
);
|
<filename>fdb-sql-layer-core/src/test/resources/com/foundationdb/sql/optimizer/rule/prepone-selects/between-lookups.sql
SELECT name, order_date, quan, sku
FROM customers
INNER JOIN orders ON customers.cid = orders.cid
INNER JOIN items ON orders.oid = items.oid
WHERE order_date > '2011-01-01'
AND quan > 100
|
<reponame>arman77262/blog1
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 12, 2020 at 06:25 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+... |
<reponame>ahmfrz/Tournament
-- Table definitions for the tournament project.
--
-- Put your SQL 'create table' statements in this file; also 'create view'
-- statements if you choose to use it.
--
-- You can write comments in this file by starting them with two dashes, like
-- these lines here.
/* Drop the database fo... |
-- =============================================
-- Author: <v-gotraj,,<NAME>>
-- Create date: <09/28/2018>
-- Description: <Update the Ym_MessagesSample Table by inserting data in desired column >
-- =============================================
CREATE PROCEDURE dbo.Yammer_UpdateColumnData_YMMessagesSample
AS
BEGIN... |
<reponame>mamunur93/pkeypro<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 16, 2018 at 11:33 AM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 7.1.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET ti... |
<filename>Database/Tables/BLOG_FILES.sql<gh_stars>0
--------------------------------------------------------
-- DDL for Table BLOG_FILES
--------------------------------------------------------
create table blog_files (
id number( 38, 0 ) not null,
row_version number( 38, 0 ) not null,
created_on timestamp( 6 ) ... |
<filename>service/code/src/test/resources/create-package.sql<gh_stars>0
create or replace package any_package
as
function any_function return example_array_type;
end any_package;
/
|
-- phpMyAdmin SQL Dump
-- version 4.9.5deb2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Mar 11, 2021 at 11:41 AM
-- Server version: 8.0.23-0ubuntu0.20.04.1
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... |
INSERT INTO auth_groups (name)
VALUES ('admins'), ('lecturers'), ('students'), ('users');
INSERT INTO auth_groups (name, description)
VALUES ('admins', ''), ('lecturers', ''), ('students', ''), ('users', '');
UPDATE highschool.auth_groups_users
SET group_id = 1
WHERE user_id = 1;
INSERT INTO `classes` (... |
<reponame>hakuza/hakuza
USE compare;
DROP TABLE IF EXISTS similar_courses;
CREATE TABLE similar_courses (
course1_id INTEGER NOT NULL,
course2_id INTEGER NOT NULL,
PRIMARY KEY (course1_id, course2_id)
);
DROP TABLE IF EXISTS courses;
CREATE TABLE courses (
id INTEGER NOT NULL AUTO_INCREMENT,
title VARCHAR(... |
SELECT SPEED, AVG(PRICE) as average_price
FROM PC
WHERE SPEED > 500
GROUP BY SPEED; |
-- get all paged user info by user_name and page_index
CREATE PROCEDURE select_user_page
@userName VARCHAR(50),
@_offset BIGINT,
@_limit BIGINT,
@total BIGINT OUT
AS
BEGIN
SELECT @total=count(*) FROM sys_user WHERE user_name like concat('%', @userName, '%');
SELECT TOP (@_limit) * FROM sys_user WHERE user_name li... |
-- 2020-03-30T15:39:12.120Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM AD_UI_Element WHERE AD_UI_Element_ID=566294
;
-- 2020-03-30T15:39:12.122Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM AD_Element_Link WHERE AD_Field_ID=591933
;
-- 2020-03-30T15:... |
<reponame>smith750/kc
CREATE SEQUENCE SEQ_IACUC_BAT_CORRESP_DET_ID INCREMENT BY 1 START WITH 1 NOCACHE
/
|
<reponame>chengyi4225372/dalian
/*
Navicat MySQL Data Transfer
Source Server : local
Source Server Version : 50728
Source Host : localhost:3306
Source Database : dalian
Target Server Type : MYSQL
Target Server Version : 50728
File Encoding : 65001
Date: 2020-05-15 13:34:44
*/
SET ... |
-- SPDX-License-Identifier: Apache-2.0
-- Licensed to the Ed-Fi Alliance under one or more agreements.
-- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
-- See the LICENSE and NOTICES files in the project root for more information.
CREATE TABLE lms.LMSSectionActivity (
LM... |
<filename>src/main/resources/db/migration/V1__create_schema.sql
CREATE TABLE IF NOT EXISTS service_instance (
`instance_id` VARCHAR(36) NOT NULL,
`db_name` VARCHAR(36) NOT NULL,
`created_at` TIMESTAMP NOT NULL DEFAULT now(),
PRIMARY KEY (`instance_id`)
)
ENGINE InnoDB;
CREATE TABLE IF NOT EXISTS servi... |
INSERT INTO VERSION_ENTITY (Version_ID, Version_Number, Version_Deployment_Date)
VALUES (11, 11, CURRENT_TIMESTAMP);
INSERT INTO ACTIVITY_TYPE (activity_type_id, activity_name) VALUES
(32, 'CONFIG_SESSION_TIMEOUT');
INSERT INTO KILDA_PERMISSION (PERMISSION_ID, PERMISSION, IS_EDITABLE, IS_ADMIN_PERMISSION, STATUS... |
<filename>src/main/resources/db/migration/V04__alteracao_tabela_usuario.sql
alter table usuario add column nr_tentativa_acesso_porta integer not null default 0;
alter table usuario add column nr_tentativa_acesso_site integer not null default 0; |
<reponame>n9puev00/todo
drop database if exists todo;
create database todo;
use todo;
CREATE TABLE user (
id int PRIMARY KEY auto_increment,
username VARCHAR(30) not null UNIQUE,
password varchar(255) not null,
firstname varchar(100),
lastname VARCHAR(100)
);
create TABLE task(
id int primar... |
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 23, 2019 at 11:15 PM
-- Server version: 10.1.24-MariaDB
-- PHP Version: 7.1.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
/*
SQLyog Community v12.3.2 (64 bit)
MySQL - 10.1.19-MariaDB : Database - phi_db
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_... |
<reponame>husnieboy/CCRi
-- MySQL dump 10.13 Distrib 5.5.36, for Win32 (x86)
--
-- Host: localhost Database: ssi
-- ------------------------------------------------------
-- Server version 5.5.36
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_S... |
CREATE TABLE IF NOT EXISTS t_user (
f_id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
f_user_id bigint(20) NOT NULL COMMENT '用户ID',
f_username varchar(64) NOT NULL COMMENT '用户名',
PRIMARY KEY ( f_user_id ),
INDEX f_user_id (f_user_id),
KEY f_id ( f_id )
) ENGINE=InnoDB DEFAULT CHARSET=utf8
insert int... |
<reponame>olegbruev/storage
select * from stack where id in (select max(id) as id from stack group by node_id,field_id) |
<gh_stars>0
INSERT INTO pos_itemtemp VALUES("IATT200004629","193077","191001","192001","30000","1","30000","0","30000","1","1","1","IAT0101200940","NHO2018000007","PAID","","193077"),
("IATT200004629","193012","191001","192001","40000","1","40000","0","40000","1","1","1","IAT0101200940","NHO2018000007","PAID","","19301... |
<reponame>ilhamdsofyan/quran
/*
Navicat MySQL Data Transfer
Source Server : LOCALHOST
Source Server Version : 100129
Source Host : localhost:3306
Source Database : db_quran
Target Server Type : MYSQL
Target Server Version : 100129
File Encoding : 65001
Date: 2018-01-01 07:02:56
*/
... |
SET search_path TO applicationmanagement;
DELETE FROM applicationmanagement.app_artifact
WHERE application_id IN ('1087ac26-491a-46f0-9006-36187dc40764'::uuid, '1087ac26-491a-46f0-9006-36187dc40767'::uuid);
DELETE FROM applicationmanagement.application
WHERE id IN ('1087ac26-491a-46f0-9006-36187dc40764'::uuid, '1087ac... |
<filename>store.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Янв 14 2022 г., 10:27
-- Версия сервера: 10.4.19-MariaDB
-- Версия PHP: 8.0.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!401... |
--Who checked out the book 'The Hobbit’?
--<NAME>
SELECT name
FROM member
WHERE id
IN (
SELECT checkout_item.member_id
FROM checkout_item, book
WHERE checkout_item.book_id = book.id
AND book.title = 'The Hobbit'
); |
-- sqlitecaching table length
SELECT COUNT(*) FROM "a___cc";
|
<reponame>cs-fullstack-2019-spring/sql-review1-extra-MelaatiJ
-- 2) The number of packages listed in this table?
select count(package)
from graded_cw1;
--
-- RESULTS:
-- 62324 |
IF (SERVERPROPERTY('EDITION') = 'SQL Azure')
BEGIN
SELECT [server_name] = 'DEMO', [service_name] = 'DEMO'
END ELSE BEGIN
EXEC('SELECT [server_name] = @@SERVERNAME, [service_name] = @@SERVICENAME')
END |
<reponame>ckayfish/tno<filename>libs/java/dal/db/dal-db-migration/src/main/resources/db/migration/U1__Init.sql<gh_stars>0
DROP TABLE public.content_reference_log;
DROP TABLE public.content_reference;
DROP TABLE public.file_reference;
DROP TABLE public.time_tracking;
DROP TABLE public.content_action;
DROP TABLE public.c... |
<reponame>rolfbecker/MIE_2.02_GeoInfo_WS2021
-- connect as user postgres to the maintenance database postgres and create the database geo.
-- psql -U postgres -d postgres -f 010_create_database_geo_create_role_001.sql
CREATE ROLE geo_master WITH
LOGIN
NOSUPERUSER
NOCREATEDB
CREATEROLE
INHERIT
NOREPLICATION
CON... |
##分页查询
#macro($csQuery())
SELECT * FROM user_channel ORDER BY code DESC
#end
##检验帐号是否存在
#macro($csGetConUserByName(conName))
SELECT count(1) FROM con_user where name=:conName and system_id=5
#end
##绑定账户
#macro($csBindConName(code,conName))
update user_channel set con_user_id =(select id from con_user whe... |
<gh_stars>1-10
-- Revert ggircs-portal:function_search_ciip_user_organisation from pg
begin;
drop function ggircs_portal.search_ciip_user_organisation;
commit;
|
BEGIN;
ALTER TABLE "user"
ADD UNIQUE ("email");
COMMIT;
|
CREATE DATABASE logistics;
USE logistics;
set global default_table_type="rowstore";
-- the packages table stores one row per package
CREATE TABLE packages (
-- packageid is a unique identifier for this package
-- format: UUID stored in its canonical text representation (32 hexadecimal characters and 4 hyphens... |
-- @author prabhd
-- @created 2014-04-01 12:00:00
-- @modified 2012-04-01 12:00:00
-- @tags dml MPP-21090 ORCA
-- @optimizer_mode on
-- @description Tests for MPP-21090
\echo --start_ignore
set gp_enable_column_oriented_table=on;
\echo --end_ignore
DROP TABLE IF EXISTS mpp21090_pttab_dropfirstcol_addpt_int4;
CREATE T... |
<gh_stars>10-100
SET search_path = public, pg_catalog;
BEGIN;
SELECT (#(hyperloglog_accum(i)))::numeric(30,10) hashtag_operator from generate_series(1,100) s(i);
SELECT (#(hyperloglog_accum(i) || hyperloglog_accum(i)))::numeric(30,10) concat_operator from generate_series(1,100) s(i);
SELECT hyperloglog_... |
DROP TABLE if exists ct_config_row ;
CREATE TABLE ct_config_row (
id serial not null primary key
, name text not null check ( name in (
'security_method',
'encryption'
) )
, ty text not null default 'str'
, value text
, i_value bigint
, b_value boolean
);
CREATE UNIQU... |
ALTER TABLE `bank_question`
DROP FOREIGN KEY `fk_bank_question_10`;
ALTER TABLE `bank_question`
DROP INDEX `fk_bank_question_10_idx` ;
|
<reponame>mydata-sdk/mydata-sdk-1.x<gh_stars>0
-- MySQL Script generated by MySQL Workbench
-- 11/17/16 16:42:54
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SE... |
CREATE TABLE proposta (
id BIGINT(20) PRIMARY KEY AUTO_INCREMENT,
tipo_proposta VARCHAR(15) NOT NULL,
status_proposta VARCHAR(15) NOT NULL,
data date,
id_cliente BIGINT(20),
FOREIGN KEY (id_cliente) REFERENCES cliente(id)
);
CREATE TABLE documento (
id BIGINT(20) PRIMARY KEY AUTO_INCREMENT,... |
USE [App4Learn]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- Comments here are associated with the test.
-- For test case examples, see: http://tsqlt.org/user-guide/tsqlt-tutorial/
ALTER PROCEDURE [ProceduresDoNotThrowExceptions].[test InsertNewExplanation NoException]
AS
BEGIN
SET NOCOUNT ON;
--Assem... |
<reponame>SPDEVGUY/VotingInfoWebsite<gh_stars>0
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[Data].[OrganizationMetaData]') AND type in (N'U'))
BEGIN
CREATE TABLE [Data].[OrganizationMetaData](
[OrganizationMetaDataId] int IDENTITY(1,1) NOT NULL,
[ContentInspectionId] int NOT NULL,
[O... |
/*
SQLyog Enterprise - MySQL GUI v8.14
MySQL - 5.0.24-community-nt : Database - onlinetest
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @O... |
<reponame>YitzhakStone/mjr<filename>DB/mjr_2015-04-11_01.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.0.9
-- http://www.phpmyadmin.net
--
-- Máquina: localhost
-- Data de Criação: 09-Abr-2015 às 04:13
-- Versão do servidor: 5.5.34
-- versão do PHP: 5.3.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "... |
<gh_stars>1-10
select a.RecordId
, c.PhoneId
from SourceData.Actions as a
full join SourceData.Contracts as c on c.PhoneId = a.PhoneId
where a.RecordId is null
or c.PhoneId is null |
<reponame>Shuttl-Tech/antlr_psql
-- file:alter_table.sql ln:2194 expect:true
CREATE TABLE part_5_a PARTITION OF part_5 FOR VALUES IN ('a')
|
-- file:foreign_data.sql ln:333 expect:true
ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 SET STATISTICS -1
|
<filename>coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/current/5.0.1/tables/KC_TBL_COI_DISCL_PROJECTS.sql
ALTER TABLE COI_DISCL_PROJECTS ADD DISCLOSURE_DISPOSITION_CODE NUMBER(3,0) NOT NULL
/
ALTER TABLE COI_DISCL_PROJECTS ADD DISCLOSURE_STATUS_CODE NUMBER(3,0) NOT NULL
/
alter table COI_DISCL_PR... |
<reponame>cse-library/koha
-- Example of currency rates.
INSERT INTO `currency` (currency, symbol, timestamp, rate, active, archived) VALUES
('GRN', 'грн.', '2016-10-31 00:00:00', 1.0, 1, 0),
('USD', '$', '2016-10-31 00:00:00', 25.49595, 0, 0),
('EUR', '€', '2016-10-31 00:00:00', 27.84667, 0, 0),
('RUB',... |
--
-- Name: reportmanagererrorcleanup(text, integer, text, text, text); Type: PROCEDURE; Schema: mc; Owner: d3l243
--
CREATE OR REPLACE PROCEDURE mc.reportmanagererrorcleanup(_managername text, _state integer DEFAULT 0, _failuremsg text DEFAULT ''::text, INOUT _message text DEFAULT ''::text, INOUT _returncode text... |
<gh_stars>100-1000
/*
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 agreed to in writing, sof... |
<gh_stars>1-10
update "HET_LOCAL_AREA" set "CONCURRENCY_CONTROL_NUMBER" = "CONCURRENCY_CONTROL_NUMBER" + 1, "END_DATE" = now() where "NAME" = 'Un-Assigned';
insert into "HET_ROLLOVER_PROGRESS"
select a."DISTRICT_ID", null
from "HET_DISTRICT" a
where not exists (select 1
from "HET_ROLLOVER_PROGRESS" b
where b."DISTRICT... |
<gh_stars>10-100
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_admin0_polygon(username text, orgname text, country_name text)
RETURNS Geometry AS $$
plpy.debug('Entering cdb_geocode_admin0_polygons')
plpy.debug('user = %s' % username)
#--TODO: rate limiting check
#--TODO: quota check
... |
-- MySQL dump 10.13 Distrib 8.0.23, for Linux (x86_64)
--
-- Host: 127.0.0.1 Database: mypetstore
-- ------------------------------------------------------
-- Server version 8.0.23-0ubuntu0.20.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER... |
<reponame>dzhdmitry/cw
/*
Challenge: Two actors who cast together the most
https://www.codewars.com/kata/challenge-two-actors-who-cast-together-the-most
*/
CREATE TEMPORARY VIEW top_actors AS SELECT fa1.actor_id AS a1, fa2.actor_id AS a2, COUNT(fa2.film_id) AS amount
FROM film_actor fa1
LEFT JOIN film_actor fa2 ... |
--
-- Search by journal type and number
--
-- JOURNAL_TYPES
SELECT
vch_rec.vch_ref, vch_table.txt, count(*) as count
FROM
vch_rec, vch_table
WHERE
vch_rec.vch_ref= vch_table.jrnl
GROUP BY
vch_rec.vch_ref, vch_table.txt
ORDER BY
count desc
-- JOURNAL_TRANSACTIONS
-- Search by Journal type and Jour... |
<reponame>TarekElBarody/storefront-backend
DROP VIEW user_view CASCADE; |
<filename>SQL/pergola_db.sql
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 15, 2021 at 02:25 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 8.0.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101... |
INSERT INTO department (department_name, manager_f_name, manager_l_name)
VALUES
("Engineering", "Tony", "Stark"),
("Sales", "Scrooge", "McDuck"),
("Marketing", "Ari", "Gold"),
("Legal", "Cousin", "Vinny"),
("Human Resources", "Bob", "Loblaw"),
("Public Relations", "Martha", "Stewart"),
("Fin... |
<filename>baloncesto.sql
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 1192.168.127.12
-- Tiempo de generación: 05-03-2020 a las 21:42:20
-- Versión del servidor: 10.4.11-MariaDB
-- Versión de PHP: 7.4.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACT... |
-- Returns information about the word with the given ID
SELECT * FROM Words WHERE id = ? OR word = ?
|
<reponame>misterhaan/abe
create procedure GetMonthlyCategoryAverage () begin
declare newest, oldest date;
set newest = GetLastFullMonth();
set oldest = date_sub(date_format(newest, '%Y-%m-01'), interval 1 year);
select round(sum(amount) / 12, 2) as amount, catid, catname, groupid, groupname
from spending_monthly
... |
<reponame>notnout/stacker.news<filename>prisma/migrations/20210511170231_vote/migration.sql<gh_stars>0
-- This is an empty migration.
create function now_utc() returns timestamp as $$
select now() at time zone 'utc';
$$ language sql;
create function ASSERT_SERIALIZED() returns void as $$
BEGIN
IF (select curren... |
alter table proposal alter column created_at drop default;
|
SELECT amenity, fhrs, sum(total) as sum_total
FROM
(
SELECT osm.amenity,
CASE WHEN tags::hstore -> 'fhrs:id' IS NULL THEN false ELSE true END as fhrs,
count(*) as total
FROM planet_osm_point osm
WHERE osm.amenity IS NOT NULL
GROUP BY osm.amenity, fhrs
UNION
SELECT osm.amenity,
CASE WHEN tags::hstore -> 'fh... |
<gh_stars>1-10
-- Con esto devuelvo la cantidad de alumnos por carrera
SELECT carrera_id, COUNT(*) AS cuenta
FROM public.alumnos
GROUP BY carrera_id
ORDER BY cuenta DESC;
--Para encontrar las diferencias borraremos elementos
--DELETE FROM public.carreras
--WHERE id BETWEEN 30 and 50;
--Deuvel todos los alumnos cuya... |
<reponame>adjust/pg-base36<gh_stars>1-10
DO $$
DECLARE version_num integer;
BEGIN
SELECT current_setting('server_version_num') INTO STRICT version_num;
IF version_num > 90600 THEN
EXECUTE $E$ ALTER FUNCTION base36_in(cstring) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION base36_out(base36) PARALLEL SAFE $E$;
EX... |
-- AlterTable
ALTER TABLE "config" ADD COLUMN "isCheckingRegistration" BOOLEAN NOT NULL DEFAULT true;
|
<gh_stars>10-100
-- file:create_view.sql ln:568 expect:true
create view tt22v as
select * from tt5 natural left join tt6
|
TRUNCATE TABLE OLE_LIC_RQMT_T
/
INSERT INTO OLE_LIC_RQMT_T (LIC_RQMT_CD,LIC_RQMT_DESC,OBJ_ID,VER_NBR,ACT_IND)
VALUES ('ILR','Initiate License Request ','1',1.0,'Y')
/
INSERT INTO OLE_LIC_RQMT_T (LIC_RQMT_CD,LIC_RQMT_DESC,OBJ_ID,VER_NBR,ACT_IND)
VALUES ('LRC','License Request Complete ','3',1.0,'Y')
/
INSERT INTO OL... |
<reponame>juliagus/saaslab<filename>app_storage/StorageModernization/UserPortal/SQL/6_cleanup.sql
DROP SECURITY POLICY Security.SalesFilter;
DROP FUNCTION Security.fn_securitypredicate;
DROP SCHEMA Security;
DROP TABLE Sales;
|
// # Introduction
// The Preventive Care logic library supports decision-making on preventive care screening.
library PreventiveCareSummary version '1.0.0'
// # Data model #
using FHIR version '4.0.1'
// # Referenced libraries #
// The FHIRHelpers library provides common functions for simplifying interaction w/ t... |
<filename>src/main/resources/db/migration/V17__create_comments.sql<gh_stars>0
CREATE TABLE hb_comments(
hb_comment_id INTEGER PRIMARY KEY,
content TEXT NOT NULL,
created_at DATE NOT NULL,
author_id INTEGER REFERENCES hb_extranet_users(hb_extranet_user_id) ON DELETE CASCADE,
post_id INTEGER REFERENCES h... |
<reponame>sr-2020/sr-2020-db<filename>sql/V10.6.3__sinfields.sql<gh_stars>0
alter table sin drop column if exists citizenship;
alter table sin add mt_old integer null;
alter table sin add nation text null;
alter table sin add nation_display text null;
alter table sin add citizenship text null;
alter table sin add citiz... |
create table dbo.Service
(
ServiceId tinyint identity not null,
ServiceName varchar(50) not null,
CreatedAt datetimeoffset default sysdatetimeoffset() not null,
constraint PK_ServiceId primary key (ServiceId),
constraint UQ_Service unique ... |
<reponame>code-epic/gdoc
--
-- INFI_TB_212_ORDENES_DATAEXT (Table)
--
CREATE TABLE ADM_INFI.INFI_TB_212_ORDENES_DATAEXT
(
ORDENE_ID NUMBER(10) NOT NULL,
DTAEXT_ID VARCHAR2(25 BYTE),
DTAEXT_VALOR VARCHAR2(100 BYTE)
)
TABLESPACE DATA
PCTUSED 0
PCTFREE 10
INITRANS ... |
-- start_ignore
SET gp_create_table_random_default_distribution=off;
-- end_ignore
--
-- CK_SYNC1 CO TABLE 1
--
CREATE TABLE ck_sync1_co_alter_part_exchange_partrange1 (
unique1 int4,
unique2 int4
) with ( appendonly='true', orientation='column') partition by range (unique1)
( partit... |
-- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3307
-- Время создания: Июл 20 2019 г., 18:13
-- Версия сервера: 5.5.58
-- Версия PHP: 7.2.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTE... |
BEGIN TRANSACTION;
CREATE TABLE `employee` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`firstName` TEXT,
`lastName` INTEGER,
`mobile` INTEGER UNIQUE,
`email` TEXT UNIQUE
);
INSERT INTO `employee` VALUES (1,'Foo','Bar',9542233872,'<EMAIL>');
COMMIT;
|
<gh_stars>0
-- priority search of behaviour observations
-- most important:
-- mood, location and timeslot coincide on tracks which are suitable for mood.
-- then: mood, location and suitability
-- then: mood, timeslot and suitability
-- then: mood and suitability
-- then: mood and unsuitable
-- joins with generic t... |
<reponame>NoMan2000/sql_func_and_procs
CREATE TRIGGER account_balance_bu
BEFORE UPDATE
ON account_balance
FOR EACH ROW
BEGIN
DECLARE dummy INT;
IF NEW.balance<0 THEN
SELECT `Account balance cannot be less than 0` INTO dummy
FROM account_balance
WHERE account_id=NEW.account_id;
... |
<reponame>geophile/sql-layer
SELECT * FROM t21 LEFT JOIN t22 ON t21.n = t22.n WHERE t22.m IS NULL |
DROP TABLE IF EXISTS itin_suggestions; |
<reponame>Siddhant-K-code/MindHub
-- phpMyAdmin SQL Dump
-- version 3.4.5
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Aug 08, 2017 at 06:14 PM
-- Server version: 5.5.16
-- PHP Version: 5.3.8
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLI... |
<gh_stars>0
CREATE TABLE IF NOT EXISTS qplFY2019ProgramResults (
`list_Month` VARCHAR(14) CHARACTER SET utf8,
`list_Agency` VARCHAR(6) CHARACTER SET utf8,
`list_Program_Owner` VARCHAR(6) CHARACTER SET utf8,
`list_Program_Paid_Un_Paid` VARCHAR(6) CHARACTER SET utf8,
`list_Activity` VARCHAR(6) CHARACT... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.